Q: about the HTML Code for puting your sketch in
Moderators: adafruit_support_bill, adafruit

Q: about the HTML Code for puting your sketch in

by D9W on Thu Mar 08, 2012 10:07 am

I was wondering how one could go putting a sketch inside the [ bracket code bracket] ... your code ... [ bracket /code bracket] And keep the color you see in our Arduino sketch
--- {I did that bracket thing so not to confuse the HTML thing on this web page- making it think I wanted that right now- I don't know how to say it properly.. but anyways…}
…. Yes, I do know how to click on the edit inside your Arduino IDE and get to the “Copy for Forum”- That’s the easy part. Then you get some stuff in bracketed quotes (top and bottom) like this >>

Code: Select all | TOGGLE FULL SIZE
[quote]
[color=#7E7E7E]//#define DEBUG[/color]
#include <[color=#CC6600]TinyGPS[/color].h>
#define RXPIN 3 [color=#7E7E7E]// From the GPS to the Arduino[/color]
#define TXPIN 4 
.....
[/quote]

It’s just easier to read your code when it’s in color, then when it’s in just black or white, or as in this case Green and white. I hate using the quote thing here to post code when it takes up so much room on a web page; especially when you just can’t take a snippet of code and ask a question about the trouble you (I) are having. I am playing with a xxx.cpp file and a xxx.h file and I am having one heck of a time trying to trace down a global value going on through it (the value lookes like it can change anywhere). I have spent time highlighting all the values instances of it and as I said it would make it one heck of a lot easier explaining what I am doing if I could have a little color between the HTML bracket code bracket … bracket /code braket. I am playing with TinyGPS ver 12 and the date is not adding up… or at least showing itself.
If I understand right this is the spot to ask how do I post “X” here… Yes, I have read how to post things here, and the correct way of doing it. Just this time, I am not sure what the right way of doing it is.

I am not wanting to get into this post with all the things I have done to get TinyGPS to work, but the things I have done clearly points me that everything is working up to TinyGPS. I just don't want to kill off any help anyone is willing to give with data over load.
D9W
 
Posts: 37
Joined: Tue Oct 26, 2010 4:25 pm

Re: Q: about the HTML Code for puting your sketch in

by adafruit_support_bill on Thu Mar 08, 2012 1:04 pm

I usually just copy & paste the code into an IDE which restores all the colors and lets me test-compile to check syntax etc. So the code button is fine for posting code. :D
User avatar
adafruit_support_bill
 
Posts: 31060
Joined: Sat Feb 07, 2009 10:11 am