Skip to main content
Filter by
Sorted by
Tagged with
3 votes
2 answers
13k views

GSM SM5100B C M E E R R O R : 4 error

I am using Arduino to control an SM5100B GSM device, everything works except when I want to send an SMS after receiving another. I get this, Error code: O K > + C M G S : 2 5 ...
mohammad's user avatar
  • 2,172
138 votes
6 answers
168k views

Mapping a numeric range onto another

Math was never my strong suit in school :( int input_start = 0; // The lowest number of the range input. int input_end = 254; // The largest number of the range input. int output_start = 500; //...
Joe's user avatar
  • 2,313
1 vote
2 answers
5k views

Store value in variable after HTTPREAD

I am working with a GSM SIM900 and an Arduino Uno. I am using AT commands for the SIM900. I am successfully getting data from GET requests and showing on the serial monitor, but after the AT+HTTPREAD ...
Ans Bilal's user avatar
  • 1,057
27 votes
7 answers
17k views

Reversible pseudo-random sequence generator

I would like some sort of method to create a fairly long sequence of random numbers that I can flip through backwards and forwards. Like a machine with "next" and "previous" ...
PapaFreud's user avatar
  • 3,826
63 votes
7 answers
111k views

Vectors in Arduino

I am making a vector of "waypoints" on the Arduino. Each waypoint is an object. The Arduino will obviously need to store multiple waypoints for waypoint navigation. But instead of storing these ...
jakebird451's user avatar
  • 2,348
20 votes
9 answers
82k views

vscode "#include errors detected. Please update your includePath

I'm trying to use vscode with arduino but have no success. The problem seems to be something with the libraries path. But I havent been able to fix that ! I'm on linux. "message": "#...
harold's user avatar
  • 317
10 votes
4 answers
12k views

Serial port not working?

I made a program that sends out data to my arduino which detects what was sent and then turns on the correct pin according to what key is pressed. When using the arduino software from my windows ...
Ryan Walmsley's user avatar
3 votes
4 answers
17k views

Get AT command response

I am using an Arduino Uno with a sim900 gps/gprs module and I'm using at commands, how can I get the response of at command (i.e OK, ERROR) so that I can do something if response == "OK" or response ==...
Ralph's user avatar
  • 568
55 votes
5 answers
133k views

Convert a String to a byte array and then back to the original String

Is it possible to convert a string to a byte array and then convert it back to the original string in Java or Android? My objective is to send some strings to a microcontroller (Arduino) and store it ...
Eng.Fouad's user avatar
  • 117k
15 votes
3 answers
77k views

PHP serial port data return from Arduino

I wonder if there is a way to accomplish reading my serial port via PHP - that works :-) In practising my Arduino skills, I developed a simple LED ON/OFF sketch. It works by entering on or off in the ...
sisko's user avatar
  • 9,832
6 votes
1 answer
11k views

SWIFT - BLE communications

I've got a SWIFT application that have to send a value to my Arduino with Bluetooth LowEnergy module! I've done correctly the search and connection parts but I'm not able to send and receive any data....
D.Tibe's user avatar
  • 73
77 votes
15 answers
378k views

Convert serial.read() into a usable string using Arduino

I'm using two Arduinos to sent plain text strings to each other using NewSoftSerial and an RF transceiver. Each string is perhaps 20-30 characters in length. How do I convert Serial.read() into a ...
Joe's user avatar
  • 2,313
67 votes
5 answers
89k views

Arduino sprintf float not formatting

I have this arduino sketch, char temperature[10]; float temp = 10.55; sprintf(temperature,"%f F", temp); Serial.println(temperature); temperature prints out as ? F Any thoughts on how to format ...
Mistergreen's user avatar
  • 1,052
30 votes
4 answers
50k views

Python to automatically select serial ports (for Arduino)

Currently the python program must know which port a device (Arduino) is on before Python can communicate the device. Problem: Whenever the device is plugged out and back in, its COM port changes, so ...
Nyxynyx's user avatar
  • 63.1k
2 votes
2 answers
1k views

Serial communication between Arduino and Matlab is losing data

I am now trying to establish the serial communication between Arduino and Matlab. The script is very simple: Matlab send a number named as i to Arduino; Arduino receive this i, then send it back to ...
Zheng  Hu's user avatar
173 votes
40 answers
645k views

Arduino Sketch upload issue - avrdude: stk500_recv(): programmer is not responding

I have an Arduino Duemilanove with an ATmega328. I am working on Ubuntu 12.04 (Precise Pangolin), and the Arduino IDE's version is 1.0. Recently, I tried to upload a few of the sample sketches ...
Pastafarian's user avatar
  • 2,120
46 votes
5 answers
71k views

How to unpair or delete paired bluetooth device programmatically on android?

The project is to use my android phone to connect with my arduino devices. but how can I unpair the paired ones. I see it seems the paired list is stored where bluetoothadapter could retrieve anytime. ...
Dev Perfecular's user avatar
14 votes
1 answer
14k views

Bluez Programming

I'm programming in BlueZ on my Raspberry Pi with an USB Bluetooth dongle. I need to be able to programmatically connect to an Arduino BT, the problem is that the Bluetooth module of the Arduino is ...
Hatted Rooster's user avatar
3 votes
3 answers
3k views

C++ decrementing an element of a single-byte (volatile) array is not atomic! WHY? (Also: how do I force atomicity in Atmel AVR mcus/Arduino)

I just lost days, literally, ~25 hrs of work, due to trying to debug my code over something simple that I didn't know while making a fireshooting hexacopter BattleBot (see it here and on my personal ...
Gabriel Staples's user avatar
2 votes
2 answers
4k views

Arduino "SerialEvent" example code doesn't work on my Arduino Nano. I can't receive serial data. Why?

I am following the tutorial SerialEvent and am trying this code: However, when I send my Arduino Nano serial data, it does not seem to be received. When I send it a message over serial, it should ...
ITDuino's user avatar
  • 51
30 votes
9 answers
97k views

C Function to Convert float to byte array

I'm trying to make a function that will accept a float variable and convert it into a byte array. I found a snippet of code that works, but would like to reuse it in a function if possible. I'm also ...
Ben Winding's user avatar
  • 11.6k
23 votes
10 answers
110k views

pyserial - How to read the last line sent from a serial device

I have an Arduino connected to my computer running a loop, sending a value over the serial port back to the computer every 100 ms. I want to make a Python script that will read from the serial ...
Greg's user avatar
  • 46.6k
0 votes
3 answers
2k views

How Do I Make My Program in Qt Continually Send A String to My Arduino?

I am having trouble trying to get my program to continually send the string "move 200" while I hold down a button. I have the button set to auto repeat however it only sends once the button is ...
Ben's user avatar
  • 117
227 votes
21 answers
82k views

How can I unit test Arduino code?

I'd like to be able to unit test my Arduino code. Ideally, I would be able to run any tests without having to upload the code to the Arduino. What tools or libraries can help me with this? There is ...
Matthew Murdoch's user avatar
59 votes
6 answers
37k views

How can I use a C++11 to program the Arduino?

How can I use C++11 when programming the Arduino? I would be fine using either the Arduino IDE or another environment. I am most interested in the core language improvements, not things that require ...
walrii's user avatar
  • 3,512
54 votes
3 answers
165k views

python3 pySerial TypeError: unicode strings are not supported, please encode to bytes:

In Python 3 I imported the pySerial library so I could communicate with my Arduino Uno by serial commands. It worked very well in Python 2.7 but in Python 3 I keep running into a error it says this ...
Nik Hendricks's user avatar
28 votes
9 answers
54k views

How to auto-detect Arduino COM port?

I'm using an Arduino with the Firmata library for communication to a C# application, and I want to eliminate a COM port configuration component since it can change from machine to machine... Is it ...
Brandon's user avatar
  • 14.2k
15 votes
5 answers
24k views

Disable DTR in pyserial from code

I'm trying to use pyserial to send data to an arduino. But when I open the COM port it sets DTR low and resets the board. However, I have my arduino code setup such that I have to put it into serial ...
Adam Haile's user avatar
  • 31.2k
11 votes
4 answers
17k views

Arduino: printf/fprintf prints question mark instead of float

I have the following code for an Arduino sketch: #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); static FILE lcdout = {0} ; static int lcd_putchar(char ch, FILE* stream) { ...
Nicu Surdu's user avatar
  • 8,271
6 votes
1 answer
9k views

Embedding Matplotlib live plot data from Arduino in tkinter canvas

I've only been using Python for a couple of weeks. I have no problems plotting the data coming in from the Arduino with Matplotlib. However the plot shows up as a pop-window and I would like that plot ...
W. Riv's user avatar
  • 63
2 votes
1 answer
2k views

Maximizing serial communication speed for live plotting data from Teensy 3.2 using Python

I'm trying to plot data as quickly as possible with Python (PyQtGraph) received from a Teensy 3.2 which is sending analog data over a serial communication. The code can sufficiently plot a test ...
epietrowicz's user avatar
2 votes
5 answers
11k views

Reading from a serial port after writing on it

I am working on a project that has my computer communicating with an arduino board that reads the sensor output and put it on the serial port only if a "t" was received.the arduino code as shown below ...
Youmna Habchy's user avatar
2 votes
2 answers
7k views

How to post to Google Docs Form directly

I'm working on a project where i need to post the data i acquire to a Google form and obtain the data from the spreadsheet. I cannot use google apps script and need a method using the direct POST ...
user1479451's user avatar
1 vote
3 answers
11k views

SIM900 AT Commands response parsing

I am using SIM900 GPS/GPRS module shield connected to an Arduino Uno, how will I be able to parse the response of my AT commands? Or how will I be able to remove the 1st line printed in the serial ...
Ralph's user avatar
  • 568
1 vote
1 answer
796 views

VGA pixel grouping on STM32

I have some code that displays a single pixel on screen through VGA but am a bit stuck on how I could set multiple pixels on screen where I want them. I set up two Timers for Vertical Sync and ...
SirSpunk's user avatar
72 votes
7 answers
184k views

Arduino Nano - "avrdude: ser_open():system can't open device "\\.\COM1": the system cannot find the file specified"

I am working with an Arduino Nano. avrdude: ser_open(): system can't open device "\.\COM1": the system cannot find the file specified This error appears just after uploading the program on the ...
user4018137's user avatar
33 votes
11 answers
101k views

How can I digitalRead a pin that is in pinMode OUTPUT?

I have a very simple test sketch in which I'm trying to set a pin to HIGH and then read its state with digitalRead. Here is my sketch. void setup() { Serial.begin(9600); } void loop() { ...
Bazzz's user avatar
  • 26.9k
22 votes
4 answers
74k views

Making a http POST request using Arduino

I am trying to post information to an API on a web project that I have created and hosted. I am not sure what the exact format is for the HTTP POST request. Every time I try I get HTTP 400 errors ...
Austen Bryan's user avatar
16 votes
7 answers
108k views

How to read a string value with a delimiter on Arduino?

I have to manage servos from a computer. So I have to send manage messages from computer to Arduino. I need manage the number of servo and the corner. I'm thinking of sendin something like this : "1;...
yital9's user avatar
  • 6,662
8 votes
3 answers
29k views

pyFirmata gives error: module 'inspect' has no attribute 'getargspec'

I'm trying to use pyFirmata, but I can't get it to work. Even the most basic of the library does not work. I guess there is something wrong with the library code. from pyfirmata import Arduino,util ...
clueless's user avatar
6 votes
4 answers
13k views

Arduino: struct pointer as function parameter

The code below gives the error: sketch_jul05a:2: error: variable or field 'func' declared void So my question is: how can I pass a pointer to a struct as a function parameter? Code: typedef ...
Peter B's user avatar
  • 623
5 votes
3 answers
1k views

C++ Function call via an object with public member pointer to function, without using dereference operator

Alright, I think the title is sufficiently descriptive (yet confusing, sorry). I'm reading this library: Timer1. In the header file there is a public member pointer to a function as follows: class ...
Gabriel Staples's user avatar
4 votes
0 answers
728 views

Pair Android with Arduino (HC-05) without manually enter pin

I'm sending some String data from android to arduino which is HC-05 . Currently I can send data from android to hc-05 successfully (with or without pairing) and I've used this method to create socket ...
Tejas Pandya's user avatar
  • 4,076
3 votes
3 answers
15k views

How to convert a char array to a byte array?

I'm working on my project and now I'm stuck with a problem that is, how can I convert a char array to a byte array?. For example: I need to convert char[9] "fff2bdf1" to a byte array that is byte[4] ...
Trung Phạm Khánh's user avatar
2 votes
2 answers
2k views

AT command responses (understanding order of code execution on Arduino)

I'm sending AT commands to an ESP8266 from an Arduino Uno/Nano (ATmega328) and attempting to parse the end of the strings received in response to establish how the ESP reacted and whether it was ...
AntInvent's user avatar
87 votes
5 answers
353k views

Converting an int or String to a char array on Arduino

I am getting an int value from one of the analog pins on my Arduino. How do I concatenate this to a String and then convert the String to a char[]? It was suggested that I try char msg[] = myString....
Chris's user avatar
  • 5,607
49 votes
13 answers
61k views

Command line Arduino compiling and uploading?

How do I compile and upload Arduino sketches from the command line on Mac and Linux? I've installed the Arduino programming environment. Are there some sample makefiles anywhere?
Mark Harrison's user avatar
28 votes
2 answers
78k views

What is the secret of the arduino `yield()`function?

The Arduino docs explain yield() at https://www.arduino.cc/en/Reference/Scheduler with regards to the Due. Apparently it is part of the Scheduler library: #include <Scheduler.h> However, I can ...
andig's user avatar
  • 13.8k
28 votes
5 answers
35k views

How is programming an Arduino different than standard C?

I have a background in programming embedded systems (TI MSP430, Atmel ATxmega). How is programming an Arduino different than those? What knowledge about C can I take in to programming the Arduino?
Nathan's user avatar
  • 835
26 votes
9 answers
24k views

Eclipse C/C++ Shows Errors but Compiles?

So I am building some Arduino code in eclipse, as described in Your Second Arduino Project, but every time I use an Arduino library, such as Serial, Eclipse underlines my function names, claiming they ...
SuperTron's user avatar
  • 4,233

1
2 3 4 5
17