Hi all,
I was wondering if anyone can offer some assistance with a very basic Arduino program I'm trying to write. I'm not too familiar with the sketching for this stuff.
I have an MQ2 sensor hooked up to my Mega2560, with a couple LEDs, one green that lights when the sensor level is below 750 and one red when it's above 750. I also have a Sainsmart ST7735 TFT connected up. I can get the LEDs to work no problem, but I'm not sure how I can get the results to print to my TFT instead of the serial monitor. Also, when I try to compile the sketch as it is, I get an error here :
myScreen TFT(cs, dc, reset, scl, sda);
This is the error:
MQ2_Sensor_Attempt_1:18: error: 'myScreen' does not name a type
I've attached a notepad with the code, if anyone has any experience could they point me in the right direction?
Many thanks,
Andy
I was wondering if anyone can offer some assistance with a very basic Arduino program I'm trying to write. I'm not too familiar with the sketching for this stuff.
I have an MQ2 sensor hooked up to my Mega2560, with a couple LEDs, one green that lights when the sensor level is below 750 and one red when it's above 750. I also have a Sainsmart ST7735 TFT connected up. I can get the LEDs to work no problem, but I'm not sure how I can get the results to print to my TFT instead of the serial monitor. Also, when I try to compile the sketch as it is, I get an error here :
myScreen TFT(cs, dc, reset, scl, sda);
This is the error:
MQ2_Sensor_Attempt_1:18: error: 'myScreen' does not name a type
I've attached a notepad with the code, if anyone has any experience could they point me in the right direction?
Many thanks,
Andy