The process of designing and writing source code as part of a program (or sketch) for Arduino. Do not use for uploading to an Arduino board.
1
vote
0answers
23 views
MCP7940 RTC Library
I am looking to implement a Microchip MCP7940 real time clock into my sensor data logging circuit that I have based on the Uno. Would the most logical solution be to attempt at changing an existing ...
2
votes
0answers
28 views
Bluetooth Master and Slave to track device's locations
I'm trying to create an app for my science fair that uses bluetooth to track people in a determined place.
I was thinking about one Arduino system to receive all the information and transmit through a ...
0
votes
1answer
33 views
Functions with string parameters
Inside my main loop there is this string:
String string1;
I have a function that will take string1 as parameter, and use it to send this string as SMS.
sendSMS(string1);
This is the sendSMS() ...
0
votes
1answer
24 views
Unexpected behavior of sprintf with i32/u32
I'm trying to build a string of characters from several elements given by the TinyGPS++ library with the use of sprintf().
This is my code making the string and printing it in the serial monitor.
...
1
vote
2answers
30 views
appending string to char and vice versa
Some days ago i started a thread.
concatenation of non constant character array with a sting
I have a different question but on the same nature (string and chars)
what i want is one variable (string ...
1
vote
2answers
41 views
concatenation of non constant character array with a sting
I have an arduino duemilanove.
I read this page on string concatenation. http://arduino.cc/en/Tutorial/StringAdditionOperator
Yet, it didnt include my case.
I have a non constant character array, ...
1
vote
1answer
40 views
Trouble with variable types and integrating DHT11 temperature sensor
I am trying to modify this sketch;
https://github.com/itsallvoodoo/home_automation/blob/master/Arduino_HVAC_Controller/HVAC_Controller/HVAC_Controller.ino
But I have a different temperature sensor, a ...
1
vote
0answers
17 views
Arduino Uno wiring and code with Parallax PMB-688
I'm new to Arudino GPS and am wondering if I could be pointed in the right direction regarding code and wiring when hooking up my Parallax PMB-688 to an Arduino Uno
2
votes
2answers
42 views
Code flow for precission applications
This is a question about programming. Mainly about the loop() function
As an example
Consider code where you get data from an accelerometer, and if the Gs are high enough you do something.
Consider ...
1
vote
2answers
46 views
No usb serial on Mac
I've been using my Arduino UNO without a hith for a few days now, but suddenly I can't program it anymore.
When I try to programm my Arduino on Mac, I get the following Error:
avrdude: ...
-1
votes
2answers
20 views
Keyboardmessage on Arduino UNO
Can an Arduino UNO and Arduino Leonardo do the same things?
Some of the examples in the Arduino software say to use Leonardo e.g. KeyboardMessage.
1
vote
4answers
76 views
How to integrate smoothing into project (HVAC thermostat / controller)
I am working on building a "simple" HVAC thermostat. This is my current sketch.
// include the libraries for gizmos
#include <LiquidCrystal.h>
#include <dht11.h>
dht11 DHT11; // ...
1
vote
0answers
53 views
RF missing characters
I've got two arduino nano devices connected via RF 433 MHz. The modules are MX-05V and MX-FS-03V. I'm using VirtualWire for sending and receiving. The speed is set to 1000 bps.
One has got a pir ...
0
votes
1answer
54 views
How does this code work?
I've found this code below, but I can't figure out how it works. Can someone explain to me the flow of the program?
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 10, 7, 5, 4);
int mem=0;
...
0
votes
1answer
35 views
Unable to light up all the LEDS connected to Arduino using processing
I have 3 LEDs connected to my arduino which are controlled via laptop key presses with processing.
While the LEDs are able to light up when the respective buttons are pressed, i am unable to light up ...
1
vote
1answer
22 views
Reading text/strings via processing
I'm trying to control an led attached to my arduino via key presses on my laptop.When i hold down a key, the led should light up, and when i release the key, the led should turn off.
While my code ...
1
vote
0answers
20 views
jQuery Validation overriding PHP backup validation [closed]
I have a form that I have specific PHP validation, but took the easy route and used validate.jquery for real time validation. My php strips white spaces and doesn't allow certain characters, but when ...
4
votes
4answers
244 views
Reducing lag between the arduino and a processing sketch on my computer
I'm currently on project #14 of the arduino project book.
I'm trying to control a processing sketch on my laptop using my arduino.This is accomplished by using a potentiometer to control the ...
2
votes
2answers
165 views
Asynchronous function calls in Arduino sketch
In an Arduino sketch, is there a way to make asynchronous function calls within the loop? Like listening to requests through http server and process them in a non-blocking way.
1
vote
0answers
49 views
Can I port Arduino code to other chips? [closed]
How could I port Arduino code to other embedded boards? For instance, I am working on a project using openPicus. I want to port the Arduino code to openPicus. How could I do this?
-2
votes
1answer
34 views
timestramp in arduino
int sensorArray[32] ;
int selectPinZero = 8;
int selectPinOne = 9;
int selectPinTwo = 10;
int selectpinthree=11;
int Enablepin=7;
int inputPinOne = 0;
int inputPinTwo = 1;
int sensor1;
int ...
2
votes
4answers
103 views
How to loop over analog pins?
I want to do something along the lines of
for (int i = 0; i < 4; i++) {
analogRead(i);
}
Which appears to work, but the following does not:
for (int i = 0; i < 4; i++) {
pinMode(i, ...
0
votes
0answers
15 views
How to create time frame in arduino [duplicate]
Dear all.
This my circuit i build. Here i am using arduino UNO Board to read the values.
Question are
How to create time frame here. In arduino timer library available . Where function like ...
1
vote
1answer
76 views
Timer1 stops firing
I am trying to use interrupts to play notes on a speaker. Timer2 works fine, but after about 15 seconds, Timer1 stops firing for about 5 seconds, and then it comes back on. If I keep running the ...
1
vote
2answers
97 views
portd not writing on digital ports 5 and 7
I try to build a function generator (preferably a sine) with an R-2R ladder and a Arduino Leonardo by Borderless Electronics.
For performance reasons one should use portd instead of digitalWrite.
...
3
votes
2answers
43 views
Convert a Bitstring into an integer value
I have got a String filled up with 0 and 1 and would like to get an Integer out of it:
String bitString = "";
int Number;
int tmp;
bitString = "";
for (i=1;i<=10;i++)
{
tmp= analogRead ...
3
votes
2answers
99 views
Allocate object memory statically; intialize it dynamically?
I have an object whose constructor gets passed a parameter. If I know the parameter value at compile time, I can construct the object statically:
static FOOOBJ foo(3);
(I understand that it isn't ...
1
vote
4answers
441 views
Can I turn off a device using the 5V and analog pins?
Could I connect a device that requires minimum 5V 1A from the 5V Pin to the Ground and somehow turn it off inside a sketch?
edit: I'm using a Due based boad, the digix ...
-1
votes
1answer
102 views
how does serial port communication work under the hood?
im just looking for how to send/ write date to pc over serial port from arduino..vice versa.
I have few Question to ask after taking so much time and couldn't figure it out myself. I hope you guys ...
0
votes
2answers
52 views
Processing Input
How to make an input from computer using processing (like a password form) and trigger pin in arduino?
If you let some link to read more that would be very helpful.
2
votes
1answer
72 views
Reverse turning of Stepper motor
I have a stepper motor connected to my Arduino like this using the ULN2003A Darlington Array:
(Ignore the potentiometer)
And I have programmed it with the following code:
#include ...
4
votes
0answers
91 views
How to write makefile-compatible sketches?
I'd like to write my sketches so that I can either build/upload them using the Arduino IDE, or optionally using GCC and a makefile.
I know about including the function declarations at the top, but is ...
0
votes
2answers
129 views
IR controlled light dimmer
I am doing a project on Arduino controlled light dimmer circuit...
I have a separate circuit for zero crossing detector and IR receiver but when I am combining both of them in arduino then my IR ...
0
votes
2answers
124 views
Default value of global variables not set
I am tracking a bug in the Marlin source code.
Background
Just for those who is not familiar with Reprap 3D printer and G-code. Marlin is a firmware that control a Reprap 3D printer. It receives ...
5
votes
2answers
230 views
Manchester Library Won't Compile for Attiny85
I am creating a wireless sensor using an Attiny85. I want to send the data to an arduino uno, so I purchased the 315mhz rf link kit from spark fun. Since the Attiny85 does not have a TX I decided to ...
3
votes
1answer
64 views
Check contents of buffer after serial read
I would like to test the contents of data received over a serial connection. In my loop() I store the data in bffr; and afterwards I would like to test to see if there are some predefined words in it.
...
3
votes
1answer
144 views
strange behaviour of dtostrf()
I'm trying to program a little bit in Arduino, but I'm stuck with probably something trivial.
This is what I have:
char ang[3], lat[9];
dtostrf(GPS.angle, 3, 0, ang);
dtostrf(GPS.latitude, 9,5, ...
4
votes
1answer
98 views
It is possible to run an entire script on the Linux side? If so, how, what and where to do that?
I am new to using Arduino Yun and I would like to know if it is possible to run an entire script on the Linux side. In my case the script should execute a HTTP request to a remote server, parse the ...
3
votes
1answer
71 views
It is possible to program Linino to send HTTP requests and then use the returned values in sketch?
I am new to using Arduino Yun and I would like to know if it is possible to run a command from the Arduino sketch in order to make (probably, through the Bridge Library) Linino to execute a HTTP ...
2
votes
2answers
267 views
How to program a CAN-BUS Arduino shield to control car windows?
My project is to control car windows using voice recognition. I have successfully controlled some LEDs using the EasyVR Arduino shield using and Arduino MEGA. Now I want to take control of the windows ...
2
votes
0answers
89 views
Response of Modbus Protocol
I have the below code. This code is successfully compiling and uploading, but I am not getting any response from Slave. What do I need to do?
Some time data being received from Slave (I get this ...
-1
votes
3answers
116 views
Pass variable in a url
Working on a code where I am able to manually enter the value in the url to let the php code save it in the database. But unsure how to it with a variable in a loop running. This is the URL:
...
0
votes
0answers
87 views
MODbus response for configure data
I am not able to receive data. I am able to send data from master but am not getting any response. This program uploaded successfully. I have below setup to monitor data from Modbus.
I have included ...
2
votes
2answers
154 views
Can I get a Datetime object from a unix timestamp?
Is there a way to get a DateTime object from a unix timestamp and hour offset? I want to be able to print a formatted string, for example Wed Apr 02 17:15:06 2014.
I have:
A unix timestamp: ...
0
votes
2answers
124 views
Modbus Protocol Compile Error
I have Code for Mod bus Library as below. I have Gone through lots of forum. How to assign device ID, slave address, length using below library function:
#include <SimpleModbusSlave.h>
#define ...
0
votes
1answer
69 views
Nothng Written to Serial when using sprintf
I'm using sprintf to use a format specifier myTemplate with some strings. The result will then be written to Serial. Although the sketch compiles fine, it does not write any thing to the serial, ...
3
votes
2answers
116 views
Can the 2nd MCU on the UNO R3 be used for keyboard emulation?
Following on from What's the 2nd ICSP header for in Arduino Uno R3? I was wondering how this could be hacked to our advantage.
For example, could that firmware be rewritten to have the UNO ...
0
votes
1answer
37 views
How do I use a i2c port expander to read buttons with pull ups and inverting the resulting uint16_t?
I am using a mcp23017 to read button presses for my joystick project and am using the internal pullup to minimize complications. Is there a way to invert all the bits in the uint16_t so i can send the ...
6
votes
3answers
174 views
How to measure total energy usage of an arduino board
I have a project that I'm currently working on. We have built a green wall, wich consists of plants on a wall
Now, we have a pump situated at the bottom that waters all the plants. There is an ...
4
votes
1answer
142 views
Reading a varying voltage into Arduino
Using an Arduino Nano and a current transformer (CT), I'm trying to sense the current flowing through a 120 V 60 Hz line.
Circuit
CT outputs 0-1 V according to its ...