Hi I am using arduino uno and a generic 8 pin esp8266 (AI cloud inside) and the web dashboard
I am pretty sure I have prepared the 8266 correctly When the esp8266 is connected to the usb uart and I select generic 8266 under boards and select the appropriate port I get this message at the bottom of the ide
If I remember correctly, the None on COM11 should be fine. Maybe just double check to see that the UART device is on COM11, but if the sketch is uploading to the ESP then you have nothing to worry about.
The connection type is where your issue is. See this post for a walk through on setting up the ESP.
It’s interesting that your router shows the ESP, but that could just be an old DHCP lease from a previous connection you made.
Hi I have succeeded in getting an uno connected to cayenne via seriel usb so that at least is a step in the right direction although I think I am on the wrong path. So I will explain what I am trying to do
the components are
3 x pir
3 x IR transmitter diodes
1 x smoke flamable gas detector
1 x esp8266 AI inside
3 x power supply
1 x wifi 240v power relay
There are three parts to my project.
1 Smoke gas detection - smoke detector switches on periodically(save power/reduce heat) and test for smoke gas
2 PIR detects movement and switches on 240v wifi relay
3 I want to get rid of all my IR remote and do it from my phone. I will need the IR codes for my tv air con dvd etc. I have seen a project that does this, but I am unsure if the codes should be in the arduino sketch if cayenne can do that (I suspect that would be better arduino memory wise).
So which of the connection options to cayenne should I be using and will I be able to connect the 240v Wifi relay to Cayenne?
Any thoughts would be appreciated
you still wanna be using the Arduino option in the “Add New” page. Here is a blank example sketch so you can see the setup on the software side. Your tx/rx of your esp will connect to the rx/tx of your nano and you need CH_PD (or EN on some chips) & 3.3v pins to be powered to a 3.3v power source, not 5v. Ground goes to ground obviously. You shouldn’t need to use anymore pins of the esp.
Follow the link above on how to install the AT firmware onto your esp. Thats the tricky part of the setup. However once you get the firmware on there you won’t need to mess with it again.
The “esp8266” option in the “Add New” page if for if you didn’t have a nano as your main controller and run everything right on the esp. This is easier but sounds like you need more pins than the ESP8266-01 has. If you looking to simplify you setup a little, get rid of the nano completely and use a WeMos D1 Mini or ESP8266 Thing from Sparkfun (esp8266-12 chips) for example and run your sketch directly on the D1 mini. You will also have better connectivity to Cayenne too this way.
//#define CAYENNE_DEBUG SerialUSB // Uncomment to show debug messages
//#define CAYENNE_PRINT SerialUSB // you need software serial to use these
char token = "token";
char ssid = "wifi";
char password = "password";
#define EspSerial Serial //port on which your ESP8266 is connected, on the nano, its Serial.
EspSerial.begin(9600); //baud rate of your esp
Cayenne.begin(token, wifi, ssid, password);
CAYENNE_OUT(V25) //monitor system uptime
float time1 = (mills() / 1000) / 60;