arduino-uno

Splitting a comma separated string through serial (Arduino)

前提是你 提交于 2020-12-31 06:40:06
问题 So my arduino is receiving a string from serial, comprising of three values separated by commas, I'm trying to separate these values into three different variables, the rest I can do. The string looks something like this "1000,1.5,0.9" or "5000,20,0.01" I would like something like: a - 1000, b - 1.5, c - 0.9 Cheers 回答1: I presume you are receiving the string that can be split in to three parts. Here's a sample code taken from this thread: void setup(){ Serial.begin(9600); } void loop(){

Splitting a comma separated string through serial (Arduino)

匆匆过客 提交于 2020-12-31 06:36:49
问题 So my arduino is receiving a string from serial, comprising of three values separated by commas, I'm trying to separate these values into three different variables, the rest I can do. The string looks something like this "1000,1.5,0.9" or "5000,20,0.01" I would like something like: a - 1000, b - 1.5, c - 0.9 Cheers 回答1: I presume you are receiving the string that can be split in to three parts. Here's a sample code taken from this thread: void setup(){ Serial.begin(9600); } void loop(){

Splitting a comma separated string through serial (Arduino)

白昼怎懂夜的黑 提交于 2020-12-31 06:34:49
问题 So my arduino is receiving a string from serial, comprising of three values separated by commas, I'm trying to separate these values into three different variables, the rest I can do. The string looks something like this "1000,1.5,0.9" or "5000,20,0.01" I would like something like: a - 1000, b - 1.5, c - 0.9 Cheers 回答1: I presume you are receiving the string that can be split in to three parts. Here's a sample code taken from this thread: void setup(){ Serial.begin(9600); } void loop(){

ESP8266 ESP-01 not show data from server in Arduino IDE serial monitor

本小妞迷上赌 提交于 2020-12-15 19:34:56
问题 i am new in arduino and ESP8266 module AT commands. I still learn about how to receive data from server and it show the data in Arduino serial monitor. I will tell you how i do and i hope someone will tell me what's wrong with my code or if any mistake that i have done. This is my php code in server side. Just a simple coding. I save it as index.php : <?php ECHO $_GET['subject']; ?> This is my AT commands in Arduino IDE serial monitor. AT+CIPSTART="TCP","nyalalampu.atwebpages.com",80 CONNECT

Android app not synchronized with Arduino Serial communication

走远了吗. 提交于 2020-07-08 22:25:48
问题 I have a simple sonar arduino project so that it prints the distance every second. I have implemented an android app using UsbSerial to communicate with my arduino. So far so good, I am able to receive data and the data I receive is correct, but the problem is that the values are sometimes not properly sent. Here is the sample output I receive: data: 7 data: 1 data: data: 71 and here is the code that generates output: private UsbSerialInterface.UsbReadCallback mCallback = new

SIM7600E-H with ATMEGA328-P for IZAT & LTE Functionality

[亡魂溺海] 提交于 2020-05-16 19:10:50
问题 I am working on interfacing of SIM7600E-H (A GPS + LTE Module) with Arduino UNO over UART using AT Commands. The high-level plan is to acquire longitude and latitude using IZAT feature and transmit them over LTE to data-server. Development Board: Arduino UNO with UART using <SoftwareSerial.h> First, I am getting GPS data using IZAT GPS feature, the acquired data is then bifurcated to get actual longitude and latitude position. Then, creating a data-string comprises POST request and acquired

VS Code giving header errors for Arduino? Missing official header?

╄→гoц情女王★ 提交于 2020-05-14 19:44:23
问题 I've recently started developing for Arduino. Initially I used the Arduino IDE but I soon realised it was not up to par. Development was considerably slower with the need for IDE restarts every now and then. I found VS Code with the Arduino Extension which I've come to love. However I have a few issues and I'm not sure how to solve it. First of all vs code throws #include errors and asks me to update IntelliSense. However it builds/uploads and runs perfectly well, it also finds the classes

VS Code giving header errors for Arduino? Missing official header?

三世轮回 提交于 2020-05-14 19:44:22
问题 I've recently started developing for Arduino. Initially I used the Arduino IDE but I soon realised it was not up to par. Development was considerably slower with the need for IDE restarts every now and then. I found VS Code with the Arduino Extension which I've come to love. However I have a few issues and I'm not sure how to solve it. First of all vs code throws #include errors and asks me to update IntelliSense. However it builds/uploads and runs perfectly well, it also finds the classes

getting the first n elements of a specified char array arduino

本秂侑毒 提交于 2020-04-17 21:13:06
问题 My aim is reading some string from serial for example 234124!3455addg#5867 if the program sees ! it should start to add it to a char array and if it sees # it should return the first 4 elements of that char array for my example the return should be 3455. How can I solve it? I made this using String class but I need to implement it to char array. I am quite new on arduino so please be clear thank you. Here is my code: const char *s = "123123123!0037selam#aaaaSDSDa"; const char *CHAR1 = "!";

getting the first n elements of a specified char array arduino

点点圈 提交于 2020-04-17 21:11:43
问题 My aim is reading some string from serial for example 234124!3455addg#5867 if the program sees ! it should start to add it to a char array and if it sees # it should return the first 4 elements of that char array for my example the return should be 3455. How can I solve it? I made this using String class but I need to implement it to char array. I am quite new on arduino so please be clear thank you. Here is my code: const char *s = "123123123!0037selam#aaaaSDSDa"; const char *CHAR1 = "!";