Ignore me- testing code tags

[quote]
[color=#CC6600]float[/color] tempF;
#define LM35_PIN 2
[color=#CC6600]unsigned[/color] [color=#CC6600]long[/color] interval=1000;  [color=#7E7E7E]// the time we need to waitunsigned long previousMillis=0; // millis() returns an unsigned long. [/color]
[color=#CC6600]unsigned[/color] [color=#CC6600]long[/color] previousMillis=0; [color=#7E7E7E]// millis() returns an unsigned long.[/color]

[color=#CC6600]void[/color] setupLM35() 
{

}
 
[color=#CC6600]void[/color] readLM35() 
{
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color]([color=#006699]"***********  LM35  *********"[/color]);
  tempF = [color=#CC6600]analogRead[/color](LM35_PIN);           [color=#7E7E7E]//read the value from the sensor[/color]
  tempF = (((5.0 * tempF * 100.0)/1024.0)*1.8)+32;
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]print[/color]([color=#006699]"Temp F: "[/color]);
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]println[/color](tempF);             [color=#7E7E7E]//send the data to the computer[/color]
}
 
[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]()
{
  [color=#CC6600][b]Serial[/b][/color].[color=#CC6600]begin[/color](9600);
  setupLM35();
}
 
[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]()
{
  [color=#CC6600]if[/color] (([color=#CC6600]unsigned[/color] [color=#CC6600]long[/color])([color=#CC6600]millis[/color]() - previousMillis) >= interval) 
       {  previousMillis = [color=#CC6600]millis[/color](); 
          readLM35();
       }
}

[/quote]

Wow,

Found the code tag symbol but it put a lot of stuff in the code. Not sure whats going on.

Found the code tag symbol but it put a lot of stuff in the code.

No it didn't. The rubbish is from Copy for Forum in the IDE. Just do an ordinary copy in the IDE.

float tempF;
#define LM35_PIN 2
unsigned long interval=1000;  // the time we need to waitunsigned long previousMillis=0; // millis() returns an unsigned long. 
unsigned long previousMillis=0; // millis() returns an unsigned long.

void setupLM35() 
{

}

void readLM35() 
{
  Serial.println("***********  LM35  *********");
  tempF = analogRead(LM35_PIN);           //read the value from the sensor
  tempF = (((5.0 * tempF * 100.0)/1024.0)*1.8)+32;
  Serial.print("Temp F: ");
  Serial.println(tempF);             //send the data to the computer
}

void setup()
{
  Serial.begin(9600);
  setupLM35();
}

void loop()
{
  if ((unsigned long)(millis() - previousMillis) >= interval) 
       {  previousMillis = millis(); 
          readLM35();
       }
}

You could have seen whether this worked or not without posting it by doing a preview in the editor, and in any case a single line of code would have shown you.

I did not know that. thanks a lot. Sorry to be a pain while I'm learning. I will use preview next time.

Nice to see someone taking the trouble to figure out tags.

...R

Just thought I'd drop by to let you know I'm ignoring you, as per your request ;)

Any particular reason you did not just add another post to your previous test?

Yes, because when I did a quick reply all the smiley faces and icons did not show up. I did not realize if I hit reply, I would get a different window with the icons.

Thanks,

Sid

Any particular reason you are not using Bar Sport for your testing?

stryzbiak: Yes, because when I did a quick reply all the smiley faces and icons did not show up. I did not realize if I hit reply, I would get a different window with the icons.

Thanks,

Sid

The icons show up in Quick Reply for me. I think that it must be a setting in your profile. "Use full editor in Quick Reply" sounds likely.

stryzbiak - this thread may interest you seeing as you are experimenting with code tags etc

Never heard of Bar Sport.

Bar Sport

"Jokes, mobs, and all sorts of unrelated topics, shout out loud your love, and curse for that burnt battery-pack"

PMS test

Nobody's reading it, because we're all ignoring it as you asked.....

Thanks I have come to the conclusion that the only way to pretty post is to use a mouse.

Its very difficult from a tablet which is my normal device.

Thanks to you and the other 108 who did not read it as well.

Bad breach of forum protocol to delete posts: my response above was in response to your specific request for people to reply, now that request is gone.

No biggy here in Bar Sport, but it really pisses members off when that happens in a real thread. Makes that answer looks like it's from a crazy person, and the thread loses its, well, thread.