-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect my Light Sensor in my ESP8266!!! #4214
Comments
Have you tried closing and reopening the serial monitor? |
@devyte closing and reopening the serial monitor gives me either nothing or random characters again like the picture above. |
Try other baud rates? 38400 and 115200 are not unreasonable. cp210x uart is good to near 1Mb/sec and ch34x almost double that. |
@markyad I just tried all of them but nothing works still. Only at 74880 baud gave me English letters when I press a reset button in ESP8266.
|
Well that certainly looks promising. You set Serial.begin(38400); in the sketch and re-flashed it? |
@markyad lol I did not do that earlier please excuse my retardness but I am still getting random characters for 38400 and 115200 |
Try choose board "Core Development Module" it lets you pick "Flash Mode", set to DIO. Set flash size to "4M/1M" or "4M/3M" and reflash sketch. |
I also read some with the same "baud locked to 74880" had to run an esptool -ce (erase_flash) once before they worked. I'm not sure why that would be, Ive got several of the same boards, none of them ever did it. |
try setting 74880 in your sketch and in the serial monitor. |
@markyad I don't have a board "Core Development Module" in my Arduino IDE. |
@5chufti I just tried 74880 and I am still getting random characters. |
Everithing was Ok, except this line "const int LEDPin = 8;", you are trying to output in GPIO8 and it is not available in the NodeMCU. I think the one you want to use is D8 (GPIO15), because to use analogWrite you must use a pin with PWM output in NodeMCU (D2, D5, D6 or D8). Feel the difference between 8 (GPIO8) and D8 (GPIO15). Select "NodeMCU 1.0..." board.
|
@lrmoreno007 Ohhh I see what I did wrong now it works so I either set LEDPin to D8 or 15 then. Thank you for telling me this sorry for me being ignorant about this. |
I also recommend using D5 instead of D8, because GPIO15 is a bit special. See note in the image that I attached. |
Okay I see what you mean thank you your pinout is more advance the one I have. |
I am using this code and getting random value for analog read .I have tested my sensor and its working fine .I have selected NodeMCU board from tool.In client.sendAll(false) ,I have changed it to true or blank but still getting random value .I am using arduino uno. #include "UbidotsMicroESP8266.h" #define TOKEN "******" // Put here your Ubidots TOKEN Ubidots client(TOKEN); void setup(){ void loop(){ |
this is by no way a problem of esp8266 arduino core but more likely sheer ignorance ... |
So basically I am trying to test my ESP8266 V3 NodeMCU by using a light sensor. It's a simple test where it reads the analog pin 0 and dim the led depending on the brightness level. But then when I try it I am getting random characters. Can someone please look at this and tell me if I did anything wrong? This test works on my Genuino Uno but not on my ESP8266.
The text was updated successfully, but these errors were encountered: