Chat here about code rewrites, mods, etc... with respect to the github project

Moderator: igrr

User avatar
By plzhelp
#80939 So i have this code for my arduino mega 2560 (which is working perfectly fine i think):

Code: Select all#include <dht.h>
dht DHT;
int temp,humi;
#define DHT11_PIN A0
String str;
void setup(){
 Serial.print(char(169)); // Copyright Symbol
void loop()
  Serial.print("H: ");
  Serial.print("% ");
  Serial.print(" T: ");
  str =String('H')+String(humi)+String('T')+String(temp);

And this is my ESP8266-12 code (which i dont know why its not!):

Code: Select allvoid setup() {
  while (!Serial) {
    Serial.write("pls work!"); // wait for serial port to connect. Needed for native USB port only

void loop() { 
  if (Serial.available()) {

The arduino should be sending the temp and humidity data through Serial1 using the String str which i think it is, but the esp module is not printing it on its own serial. i have each device connected to a different port just as this video is telling me to do: [youtube][/youtube]

but i am not getting the same result as he is, i only get a blank screen for my esp serial monitor!

Any help is very much appreciated!!
User avatar
By RichardS
#81013 The serial port on the ESP8266 is connected normally to a USB to serial chip like CH340 etc... If this is still connected I might expect this not to work....

User avatar
By mrburnette
#81052 I have found it invaluable to have something like this on my bench:

You can also use a USB-serial converter and your PC with the Arduino IDE monitor or a communication program. These can be had for a couple of dollars on Aliexpres or a very nice one from Adafruit: