Hot answers tagged

7

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)...


4

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)...


3

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 ...


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

Yes, there are systems designed to continuously receive such data and the data exchange is standardized, even some Units are standardized. OPC DA An example is OPC Data Access for real time values. It seems you want to build a graph, so OPC Historical Data Access is more what you're looking for. One would set up the data points on the server side once, i.e. ...


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


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

A 200 response doesn't guarantee that your payload will actually contain any data. It depends on the server. The server might determine to respond with a 200 code but still not return any JSON code for your request. I am not at all sure, but the server may be rejecting your request because it doesn't like your user agent. I have seen my own ESP8266 supply ...


2

No, there is no "industry standard". You are free to choose what you like. If you want to be completely generic you could choose to do something like: p1name=Temperature&p1units=celcius&p1value=23.4&p2name=Humidity&p2units=%25&p2value=43.8 (%25 is a % when URL encoded) Or you could use: p1=Temperature/Celcius/23.4&p2=...


2

I don't think there is. It also kind of depends on how you are going to store the data. I'd go with motion=true instead of pir=true, as it describes what you are detecting, instead of what sensor type you used. What if you decide to change the PIR sensor to a radar-based sensor. Now the variable name doesn't make sense. Secondly, what happens if you add a ...


1

What you need to do is leave the board connected to your computer and watch the serial monitor to capture the output during the crash. If the board has a true crash it will output a bunch of information which may tell you why you it is crashing. It could be a strings/heap problem or maybe a memory issue since you are declaring a new http object every 5 ...


1

I cannot really narrow down the source of your observed problems, since the problem descriptions are not clear enough. But there are some obvious problems/potential for making it better in your code. In the Uno Code: It is totally unnecessary to use a timer interrupt for reading the SoftwareSerial interface. Instead you should write your loop() function ...


1

The TIP120 is a poor choice because of the approximate 10% - 14% voltage drop across it. Try the circuit with a logic level, low Rds MOSFET. For a more in-depth answer, please see this answer: https://electronics.stackexchange.com/a/388468/165322


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

I was wondering if it would be possible to wake an ESP8266 from a request over MQTT while it is in Light-Sleep mode? No. The ESP8266 has to be awake to communicate with the MQTT server. The best you can hope for is a periodic wakeup to connect to the server and check for any new data. But of course that relies on the data being set to QOS 2 so it keeps ...


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

This is the code which worked for me:- msg.remove(0,1); msg.remove(msg.length()); pos = msg.toInt(); Serial.print("value of servo angle: "); Serial.println(pos); myservo.write(pos); I had to remove this character (" ") by using msg.remove(0,1) & msg.remove(msg.length()) that removes starting and ending string.


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.


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