Hot answers tagged

6

In my opinion, it is more desirable to program the ESP8266 directly. I'm always shivering when I see a Uno (ab)using the ESP8266 as a WiFi bridge when the ESP8266 already has everything needed for the project. Of course, this is highly project specific. Advantages of programming an ESP8266 directly: you learn about a new MCU and architecture (XTensa vs AVR)...


3

As long as I know you need at least 170mA to power the esp8266 also you need 100-200mA for the arduino and 100mA for the relay so I recommend to use a 1A power supply and solder some capacitors on the 5V and 3.3V rails. Also if your Wi-Fi is giving a ip address that is limited for certain time for example 1-2 hours you need to expand that time for your needs....


3

As Musa said, I needed to suply the website certificate footprint to http.begin. void loop() { HTTPClient http; String thumbprint="08:3B:71:72:02:43:6E:CA:ED:42:86:93:BA:7E:DF:81:C4:BC:62:30"; String path = "https://calm-falls-41696.herokuapp.com/api/v1/cards.json"; http.begin(path, thumbprint); int httpCode = http.GET(); Serial.println(httpCode)...


2

You had the following general problem: The code you were using was configuring a pin into INPUT mode and reading the value on it. On this pin you conencted a button without extern pullup or pulldown resistor. This means that if the button is not pressed, it is not connected to anything and thus a floating pin. You cannot realibly read the value of the ...


2

After quite long research I found the solution for my problem. I did some changed power connection to ESP-8266. ESP 8266 --------- Arduino Uno Vcc ---------> 3.3v CH_PD ---------> 5v divided into 3.3v using resistors RX ---------> PIN-2 via 3.3v regulator. After this configuration, my system was working perfectly for days. ...


2

Two of those 10mA come from the ATECC608 crypto chip which idles at 2mA. That leaves 8mA for you to track down. The WiFi-NINA module has multiple "sleep" modes that range from 30mA down to 4.5µA. Since you can't be in the 30mA "modem sleep" mode (it's too high for your measurements) I suspect it enables "light sleep" at 800µA. The switching regulator ...


2

When you added the class you obviously deleted/moved code into it from elsewhere. One bit of code that you missed in that moving around will be the code that declares what esp8266 is: SoftwareSerial esp8266(2,3); // for example Find that in your original code and copy it across.


2

Try just using IP address for the Host line instead. I did the same thing for POST and it works fine for me. Example: Host: 13.xxx.xx.xx


1

Setup for your server a port without SSL. A plain HTTP port, not a secure HTTPS one. Arduino Uno has not the computing power and memory for required security hashes. Your line endings in the request are wrong. You add empty line with println("\n"). Remove all httpClient.println("\n");. You add \n before \r\n sent by println in println("protocol: HTTP\n"). ...


1

You should break your problem down into simple parts, which it seems you are on-track to do. Your ultimate goal appears to break down into the following sub-tasks (not in order): Read sensor value Connect to a WiFi network Connect to a MySQL server Send sensor data to MySQL database You are unlikely to find a single library to do all of these tasks, but as ...


1

You have two sketches in the project folder ESP_WiFi_VFO. First is ESP_WiFi_VFO.ino and second is AD9834_Test.ino. Booth sketches have defined same functions, constants and variables so the final program can't be build. Delete AD9834_Test.ino from the sketch folder ESP_WiFi_VFO (Delete C:\Users\Ewan\Downloads\ESP_WiFi_VFO\AD9834_Test.ino)


1

I think the simplest option is to experiment first: record the vibration level as a function of time during one wash cycle, and do that with a few different washer models. Then look at your data and devise an algorithm with your eyes on the measured curves. This is really the only reasonable way to do any kind of signal processing: look at the signal first. ...


1

You do not need the IP address of the server. You connect with the name of the server and DNS will resolve it to IP address. See the WiFiClient example of the ESP8266WiFi library


1

From the description and comments it looks like the problem is HW related. I recommend you to do a relay module test (wthout NodeMCU): Try to switch the relays on/off just by connecting the power source you are using for powering the NodeMCU. Connect VCC–5V, GND–GND and one of the IN channels directly to 5V pin. If the relay switches on, try another ...


1

Can I directly connect an ESP GPIO pin to the base of the transistor where the arduino is connected? No. You will effectively be connecting two outputs together, and that is very bad. Instead you will need to add a second transistor in parallel to the first - one controlled by the Arduino and one controlled by the ESP-01. Can I put a relay module ...


1

The ArduinoHttpCliemt library's HttpClient.stop() method does two things. It resets the state of the HttpClient object and stops the underlying Client connection (TCP connection). If HttpClient.stop() is not called, the internal state is not good to call get() or post() again. The method resetState() is called in HttpClient.stop() to reset the internal ...


1

In C++ you are not allowed to declare non-static member arrays with unspecified size (empty []). Supplying an in-class brace-or-equal (BoE) initializer for such non-static member array does not override this rule struct S { int a[] = { 1, 2, 3 }; // <-- ERROR: `[]` array declaration is not allowed here }; If you really need these arrays as non-static ...


1

You should use mDNS. Install (if it isn't already) avahi-daemon on your Raspberry. Then check out the ESP8266mDNS library and the examples it has. Especially the mDNS-SD_Extended example, which performs a query for a service on the network.


1

The error you're reporting is coming from your call to PubNub.publish(). You could have diagnosed the problem by taking outputting and inspecting what you were passing to it. Your line: PubNonSubClient *pclient = PubNub.publish(pubchannel, "String(IMU.getAccelX_mss())"); is not going to work. You're sending the string "String(IMU.getAccelX_mss())" to ...


1

You need to connect as a central device. I've had good luck with the adafruit nrf52 feather. Also see: https://github.com/Freeyourgadget/Gadgetbridge for the protocol.


1

Fixed it.... turns out that in the tools, the board was selected to be NodeMCU 0.9 when it should actually have been NodeMCU 1.0 so i just changed it to NodeMCU 1.0 and it worked!


1

You have 2 errors shown here. The first notes your line of code: pinMode(relay,OUTPUT); And notes that the parameters you pass in differ in type from what is expected, and then it lists what types are expected: void pinMode(uint8_t pin, uint8_t mode); Thus, you are declaring either relay or OUTPUT as a char array (like a string). Same for the next ...


1

A problem in the include file on the line previous could cause the following line to be misinterpreted. To test that try moving the ssid after the password and see if the error changes. Obviously make sure all strings are properly quoted. #include <WiFi101.h> #include <WiFiSSLClient.h> const char* password = "SYDTSTQR"; // your network ...


Only top voted, non community-wiki answers of a minimum length are eligible