C is a procedural programming language which is widely used in embedded systems. PLEASE NOTE: Arduino is typically programmed in C++, not C.

learn more… | top users | synonyms

0
votes
3answers
29 views

AES Simplified for Arduino - Having hard time achieving desired result

Okay, here's the story. I'm not very familiar with how Arduino works but learning. I have a project that requires AES encryption on the Arduino Uno. As per a previous question we managed to figure out ...
0
votes
2answers
25 views

Empty char variable

How do I empty all the values inside a variable char array[256];? I tried a for loop assigning an empty value at each iteration, but it doesn't compile.
0
votes
4answers
27 views

deprecated conversion from string constant to 'char*'

What does this error means? I can't solve it in any way. warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
0
votes
2answers
35 views

Number of elements in an array char

What kind of function can I use to know how many elements are in an array char? sizeof() gives the number of 'spaces' available so it doesn't work for me.
0
votes
1answer
25 views

Converting float to String

How can I convert a float value into a String object without implementing any library? I'd like to avoid using char array.
0
votes
1answer
54 views

How to use C Libraries for Arduino code

I have a code in Visual studio that I want to implement in Arduino. But there is a problem. Many libraries usable in Visual Studio aren't usable in the Arduino IDE. How can I use them in my Arduino ...
-1
votes
0answers
28 views

Counter variable won't be at 0

I am feeling a bit dumb to be honest. This is my code: for ( int i=0 ; i < 2 ; i++ ) { // First loop for ( int ii=0 ; ii < 16 ; ii++ ) { // Second ...
0
votes
1answer
19 views

Conver char value to variable?

I want to pass the preprocessor values(AT commands) to the Serial.println function. Im trying TCP connection using arduino-SIM900A. I've declared all AT commands to each preprocessor variables like ...
0
votes
0answers
24 views

Linear equation solver Arduino Calculator, printing wrong answer

I wrote a code in C to solve equations, but I don't know why some equations that I input into this calculator, give me wrong values, the algorithm is correct because I execute it in C and give me the ...
1
vote
2answers
166 views

How to read code from Arduino Uno to Arduino IDE? [duplicate]

we can upload a code into Arduino UNO from our computers, but how about reading code? Can we read and get C codes from compiled codes from Arduino hardwares? My second question is that will we read ...
0
votes
1answer
50 views

GPS logging on the intel edison breakout board

I'm working on my project car, and I have decided I would like to have a GPS and log some sensors too. I'm just at a bottle neck here, the sensors I have brought pull about 7v each where I can't pull ...
0
votes
0answers
29 views

How do I install a library in Arduino Yun cross compile environment?

A few days ago, I've asked this question. Thanks to the replies I've received, I've set up a cross compile environment for Yun by following this guide. I've created a virtual machine with virtualbox ...
0
votes
1answer
25 views

Arduino Yun doesn't link any library

I'm writing code for a project with Arduino Yun. My project is quite simple: it takes a picture with a webcam and saves it in a PNG or JPEG file format. I've already installed the uvc driver for ...
3
votes
1answer
180 views

Basic makefile for avr-gcc

I would like to make a makefile for compiling c programs for the arduino. I am somewhat familiar with make but have never used it with avr-gcc. What is the simplest way I could put the commands below ...
0
votes
1answer
94 views

Reading/writing to Arduino GPIO pins from raw C code

I'm interested in writing a C program without the Arduino IDE and related libraries and am trying to figure out how I can access the GPIO pins for read and write. My assumption is that the GPIO pins ...
0
votes
2answers
57 views

Interesting Problem with Arduino UNO Code(IGNORES VARIABLES SELECTIVELY)

This is the first code I wrote for my UNO R3 just to feel out the functions and I've already got some jankiness.(throughout this description I am referring the first two if statements one inside the ...
4
votes
2answers
677 views

Why doesn't my code work in a function, yet works inline?

I'm trying to write a faster shiftOut function, which does not use the slow digitalWrite. In my code I have the original shiftOut, the new shiftOutFast, and the same as shiftOutFast, but inline. The ...
1
vote
2answers
47 views

cannot convert error with pointers

I write a code to store patterns for LED blinking, but I got this error: led_basics:39: error: cannot convert 'char (*)[17][2]' to 'char*' in initialization led_basics:39: error: cannot convert ...
6
votes
3answers
442 views

Writing C Program outside of Arduino IDE?

I like the idea of using the Arduino IDE for simple projects and for getting started with Arduino, but the consensus I've gotten so far is that it is for those who are new to Arduino and/or ...
0
votes
1answer
80 views

Arduino/DuinOS vs Normal C/ARM Programming

I'm trying to understand the difference between programming Arduino hardware (Atel/ARM based) versus 'normal C-based ARM programming'. My understanding is that the Arduino language is cross-compiled ...
0
votes
2answers
38 views

Problems splitting a string to get authentication and command

Good afternoon, In a nutshell I'm having some difficulty with splitting and returning part of a string. Essentially I'm working on the code for transmitting a password (24 character string) and ...
1
vote
2answers
47 views

Why does my LED turn off auomatically after about 18 seconds on its own?

I am using the Arduio Due and I am programing it with Atmel studio 6.2. I have had a HUGE learning curve using this IDE and the Atmel ASF. Nothing is straightforward as it is in the Arduino IDE. None ...
0
votes
0answers
70 views

send SMS for 1 time with arduino GPRS SIM900 if an iput is HIGH (4 Digi inputs)

I faced a problem to send 1 SMS if an input is HIGH,and if it is LOW==> no SMS to send,if LOW to HIGH==> send 1 SMS. this code not working,just sent SMS when I turn the GPRS on,and after nothing is ...
1
vote
0answers
51 views

send SMS for 1 time with arduino GPRS SIM900 if an iput is HIGH

I faced a problem to send 1 SMS if an input is HIGH,and if it is LOW==> no SMS to send,if LOW to HIGH==> send 1 SMS. this code not working,just sent SMS when I turn the GPRS on,and after nothing is ...
2
votes
3answers
173 views

Arduino error in code

i'm making a project and i came across the follwing error. Whan i'm trying to compile and upload the code i'm getting those errors: ShiftRegisterTest1.ino:In function 'int* return_pins(int)' ...
0
votes
0answers
13 views

How to get read user input from DAQ for a given time interval?

I'm using a built-in DAQ simulator. When it opens, it shows 3 different LEDs with 3 pushbuttons, one corresponding to each LED. I'm trying to read the user input from 3 pushbuttons for a time ...
0
votes
1answer
59 views

Running C for arduino

Is there a compiler that I can use to run C on an arduino or any other way so that I can upload C programs to my arduino?
1
vote
2answers
412 views

Convert uint8_t array to uint32_t array

I have this array of bytes, that I need to convert to an array of unsigned ints. Also the function (btea) that needs it, seems to need a pointer. I'm currently using reinterpret_cast which seems to ...
3
votes
2answers
172 views

Problem importing a library in .h file

I have following code: MyApp.ino: #include "DfRobotLcdShield.h" void setup() { } void loop() { } DfRobotLcdShield.h: #include <LiquidCrystal.h> When I try to compile, I'm getting the ...
0
votes
0answers
28 views

27 Servo Project, Uno with Adafruit's 16-Channel Drivers

I'm working on a project where I need to be able to control 27+ servos. The problem is that I am unsure how to control them from a computer. I'd love to build a simple program with a user interface ...
2
votes
3answers
220 views

How to calculate phase shift between two square waveforms with Arduino DUE

I have two square wave signals with the same frequency. I want to measure the phase shift between these two signals. There will be a small phase difference between two signals. (0-90 degree) and the ...
3
votes
1answer
402 views

Port manipulation using C code

I'm trying to manipulate the ports of Arduino using C code. I have attached an LED to pin 8 and a tact switch to pin 13 (with a pull down resistor). The code works fine, and the results are printed on ...
5
votes
2answers
264 views

SAM3X8E (Arduino Due) Pin IO registers

How does IO registers of Arduino Due work? On Arduno Uno just set DDRx, then PINx to read, PORTx to write, I'd like to do the same thing with an Arduino Due, but it has many more registers, such as ...
0
votes
3answers
141 views

ISR executes even though an interrupt is not triggered

I am trying to implement a function queue scheduling system. INT1 is connected to a button and int1task causes an LED to flash. typedef void (*funcptr)(void); TPrioQueue *queue = NULL; void ...
1
vote
2answers
180 views

Programming arduino with Objective-C

Can you use clang, with --mpu=arm, etc. and avrdude to program an Arduino Due (Arm Cortex M3)?
1
vote
4answers
1k views

New to Arduino: Should I learn C, C++ or both (C & C++)?

From what i've researched here is my thoughts on both C++ I heard that you can create libraries using C++ in arduino. And you can use the Arduino IDE to do that stuff. Here is the proof ...
3
votes
1answer
280 views

Chain of, or one big if sentence

(This might be more of a common C question) I want to test several conditions in an IF-sentence if(variable) { // fastest check if(register) { // a bit slower ...
1
vote
2answers
129 views

Is Arduino IDE enough to program with C or C++?

I am using Arduino IDE to program my ATmegas with bootloaders. I can directly manipulate ports, use timers, interrupts, PWM pins and timers, etc. Everything is working. But this question arises: Does ...
0
votes
1answer
55 views

OSC parsing code. Can it be optimised?

I'm using this OSC library and TouchOSC to controls some motors. Right now I'm receiving those two kind of messages: /u/1 // move motor 1 of default steps /u/2 // move motor 2 of default ...
-1
votes
0answers
33 views

DhcpAddressPrinter Example Has No Output in Serial Monitor [closed]

I am new to the Ethernet shield, and I tried to use the DhcpAddressPrinter example but I can't get any output. What I did was.. I connected the ethernet shield to the router using my Ethernet cable ...
0
votes
1answer
275 views

Concatenate two non constant char arrays in Arduino

I have two non constant char arrays. One is "buff" and other is "buffa". I get values in buffa via rf transmitter of other Arduino and I want to append those data to the data inside of buff. Then I ...
1
vote
0answers
200 views

reading arduino output from serial line

I'm attempting to read data from the serial line coming from the arduino and return it as a string. I have found/modified the following code to do so: #include <sys/types.h> ...
0
votes
3answers
328 views

Can I program Arduino with Python? [closed]

I know that I can program Arduino with python but is it possible to make every project, which can be completed by normal IDE?
1
vote
0answers
157 views

TinyDuino Bluetooth Le to Android or Iphone

I have not used the Arduino in quite sometime so i am rusty in programming the device, but i am getting back into it through the tinyduino. I was wondering if someone could help me? I currently have 2 ...
1
vote
2answers
113 views

Where can I see the output of printf?

I would like to know where I can see the output when I use the command printf. I am programming using the Arduino interface. Update I'll add a few lines of code for better understanding: #include ...
0
votes
1answer
54 views

Sweep with two shift registers

I am working with 8 dual color LED's and 2 shift registers. My connections are in place. But I do not understand how to work with 2 shift registers. So I am trying to make this: turn the first led ...
1
vote
3answers
506 views

Comparing a char with the symbols '.-'

I'm using the Arduino software to create a Morse code decoder using the serial monitor. I enter a Morse code such as .- as a text string and it's displayed in the LCD as a alphanumeric text. So if I ...
1
vote
1answer
77 views

How to prevent Ardiuno compiler from merging changing of port pin outputs into a single operation

I want to set one pin's output value, and then set a different pin's output value so that the two pins change value one after the other. However, the compiler optimises the two calls to change both ...
2
votes
4answers
658 views

ATtiny85 minimum setup to blink led

What would be the (very) minimum schematic to make a ATtiny85 blink a led? Restrictions are: There must be a C program compiled and uploaded to it, just like an Arduino board would have. The code ...
0
votes
1answer
460 views

Arduino server to read from multiple clients

Socket programming question here. My interface comprises of an Android device(client), A wireless module hosting an access point, and an Arduino Uno(server). My Android client class works when 1 ...