Actually I have created a node server for storing data, and i want to implement web socket connection from nodemcu to node.js server. For that I’m using SocketIoClient library, following is the code: #include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266WiFiMulti.h> #include <SocketIoClient.h> #define USE_SERIAL Serial ESP8266WiFiMulti WiFiMulti; SocketIoClient webSocket; void event(const char * payload, size_t length) ..
I am trying to do a project with the Arduino Motor shield. I need to spin Motor A forward, stop it, spin Motor B forward, stop it, spin Motor A backward, stop it, spin Motor B backward, and then stop it. My code only spins Motor A forward then Motor B forward. I have been ..
I am trying to let Raspberry pi and Arduino send and receive text via input. My problem is getting the input from arduino and sending it. I am VERY new to C++, this is my first program in it, so I don’t know exactly how the code is reading everything. What I want to be ..
I write code for ps/2 keyboard. I cannot use library cuz i need send few specific bytes (Prodikeys DM). In interrupt on pin (ps/2 clk) receving data works fine, but on sending "switch" stuck on "case 9". Helps reseting variables. I try another Arduino and it still don’t work. How to fix this issue? #include ..
I have an arduino with 3 sensors connected and need to send the information I’m getting from the said sensors to another arduino and have it displayed on a connected lcd. I tried to go about this by changing the float values I’m getting into a string, sending the string to the other arduino and ..
What is the Mac OS X alternative to HANDLE, COMSTAT and DWORD in the SerialPort.hpp? The files are for my game pad controller which I am going to use for my Arduino Uno Gamepad 😀 Note: The files are from Manish Kumar Mandal’s Blog, his GitHub for serial port communication. Code: 1)SerialPort.cpp 2)SerialPort.hpp Thanks 😀 ..
I am successfully receiving data over RF on a second Arduino. However I am trying to compare the incoming string so that I can call a method when there is a match. The "if" block is never executed. I am just trying to compare the strings that are incoming. It’s printing the correct values to ..
I’ve been pulling my hair out trying to figure out what’s wrong with my setup/code here. I have an Arduino UNO controlling a 5M RGB LED strip connected to a PC with a custom application to send serial data to control it. For the purpose of testing though, I’m using the Arduino serial monitor to ..
I want to check ultrasonic sensor data by micro SD card. ultrasonic protocol is I2C. but Serial monitor show "Couldn’t open log file" message me. I don’t know why. When I used another Lidar sensor by PWM, I can save a data. But, Same sensor that use I2C Method cannot save a data. Are there ..
So I am doing a project which involves serial communication between a rsp and an arduino Uno. The code for spitting the string uses this line: sp = strchr(data, ‘ ‘); However my compiler chucks an error saying that sp is not declared in this scope. I tried to put it before the loops but ..