{
void setup ()
???
void setup ()
{
{
void setup ()
???
void setup ()
{
Where ?
Juju14a:
Where ?
How many places in your code do you have "void setup()" with a { before it?
Steve
Did you look?
My code :
// put your main code here, to run repeatedly:
const int sensorPin = A0;
const float baselineTemp = 20.0;
{ <————<<<<
void setup ()
Serial.begin(9600); // ouvrir un port serie
Yes, I see it but what should I do?
thank you so much
Juju14a:
Yes, I see it but what should I do?thank you so much
Move the { to somewhere more appropriate.
See the examples in the IDE for clues.
Or exactly please?
You should change that part of the code so it looks like the second version you were given way back in post #20.
If you're expecting that people will simply write your code for you with you making no effort to do anything you're in the wrong place. This isn't a free code writing service.
Steve
exactly please?
I can tell you are getting frustrated. Take a break and come back to it in an hour or so, re-read the advice below, then start anew. You didn't copy the example exactly, you left some stuff out, and switched things around. This shows you aren't concentrating. So here is some advice to read when you come back:
Make it say:
void setup()
{
not
{
void setup()
Then you still have an error that you were told about earlier. Way down near the bottom, you have:
else if (temperature >= baselineTemp + 6{
digitalWrite(2, HIGH);
For every ( you need a ), and for every { you need a }. In this case you don't have the matching ). So change your code like this:
else if (temperature >= baselineTemp + 6) // <---- put a close parenthesis right there
{
digitalWrite(2, HIGH);