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.
0
votes
0answers
7 views
Arduino Pro Mini
I have the following problem
I have a pro mini clone, with 328/5V. It was successfully working in my board. I pulled it out of the board, and wanted to update my software. I connected it to my FTDI, ...
0
votes
2answers
8 views
How to write array of functions in arduino library?
I've nine functions each of type void as follow:
void zero();
void one();
void two();
void three();
void four();
void five();
void six();
void seven();
void eight();
void nine();
I've put all these ...
1
vote
1answer
22 views
How to speed up
I found that using more float variable in arduino uno(atmega328p) slows it down (very muck that i can get slow response)
so, how to speed up it processing ?
my data are euler's angle with 2 digits ...
0
votes
0answers
24 views
Processing White Screen?
I'm new to using Arduino and I am trying to replicate this guide.
I got my Arduino wired correctly with the code uploaded to the Arduino. I downloaded processing and updated my Java and tried running ...
1
vote
0answers
19 views
Trinket error code
I am trying to get the Trinket to run a simple servo, but keep getting an error code.
This is the error message:
exit status 1
Error compiling.
I got the code from the Trinket Library at Adafruit ...
0
votes
0answers
15 views
ICT Bill Accepter
I have a ICT a6-15scp-usd4-ii. I have all of the wires for it. I dont have the gambling machine it came out of and it was laying around. Is it possible to make a Light come on when a bill is put in? ...
3
votes
4answers
101 views
Multiple non-blocking countdown timers?
I'm building a control system for three sump pumps using a single Arduino and a set of relays. I have float sensors for each one, and need the Arduino to trigger the relays when the float sensors are ...
-2
votes
1answer
35 views
What isthe best programming language for embedded systems? [closed]
I would start to learn the best programming language for embedded systems to control devices. What I have heard about that is Assembly Language. I want to know if there is any better languages to code ...
0
votes
0answers
23 views
Connection between Matlab and Arduino
I'm trying to connect Maltab and Arduino by this code:
arduino=serial('COM7','BaudRate',9600);
fopen(arduino);
But I get this message:
Open failed: Port: COM7 is not available. No ports are ...
0
votes
0answers
29 views
What types of embedded system for build an automation projects do you know? [closed]
I mean in what niches I can use it. I read about one man who tried some embedded system for build smart-home and it's was success there.
0
votes
0answers
24 views
Help with school project (Arduino GSM and Thermal printer)
I'm with some friends from my school and we have started to do a project where we send an SMS text message to our Arduino UNO (with GSM module), which then print the text message on a thermal ...
1
vote
1answer
54 views
Turn on a light when there is an input
I am using the pin 4 as an OUTPUT and pin 8 as an INPUT to turn on/off the light, but for some reason it is not working. Light is on all the time, but when I try to input something it gets brighter ...
0
votes
1answer
54 views
Why doesn't my object's method return back to my caller method?
I am creating a miniature computer using an Arduino, and I am creating a full-scale interpreter for it. Everything works, and the code begins to run after calling the runCode method, but once the run ...
2
votes
5answers
593 views
Difference between data type int and long on Arduino
I was learning to program for a void obstacle robot but when I looked at the code I saw two data types long and int.
Int are datatypes that holds -2,147,483,648 to 2,147,483,647.
Long are also ...
0
votes
1answer
32 views
combining code of multiple sensors in one program
I need to operate 2 different sensors (gas and temp) simultaneously.
I have managed to run each one of them separately and I don't know how to manipulate the code so they could work together. My ...
4
votes
1answer
38 views
Double ## in macros
I was looking at some macro use in an Arduino code. I believe what this macro does is it expands into a state that basically sets a pin to either input or output, but I'm a little confused about ...
1
vote
2answers
70 views
Arduino Infinity Loop
I'm new to this Arduino programming. So I want to ask about my current project. My lecturer told me to make a temperature sensor using an LM35, where a green LED will light up when below some certain ...
3
votes
2answers
59 views
Since double and float represent the same data type (usually), which is preferable?
It looks like on ATMega based boards, float and double are equivalent 32-bit (4-byte) data types.
However, on the Arduino Due, doubles are 64-bit (8-byte) where floats are 32-bit (4-byte), same as ...
1
vote
2answers
39 views
Help Understanding FFT Analysis and analogRead()?
Here's the deal, I'm attempting to learn how to use an FFT (Fast Fourier Transformation) Library for sound analysis (link is here). My issue is that this comes with included C++ code to show users how ...
1
vote
1answer
19 views
What is preventing my code from checking the number of pushbutton values for a correct/wrong answer?
My code is supposed to generate a random number and then display it in binary using four LEDs. After you press it, it waits for two seconds before checking your number of pushbutton presses to see if ...
1
vote
2answers
65 views
Detect how long a push button is being pressed?
I would like to detect how long the state on/off is going on for. Is there a way to do that? I would like to do that for two reasons:
I would be able to make a very simple toggle button. (I know ...
1
vote
1answer
22 views
Data changes when working with classes
When I pass an array, and it's len to the constructor of a class. I store the length, and access it later, it's value changes, seemingly at random.
#include "Arduino.h"
#define NUMSENSORS 2
const ...
0
votes
1answer
24 views
how to solve the delay in the buffer?
I need help guys ...
I want to solve the delay in this buffer :
char ch;
void loop() {
int packetSize = Udp.parsePacket();
Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
delay(70); ...
0
votes
0answers
36 views
Arduino programming attiny13a
Hello I want to program an Attiny13a with Arduino code. I always have this error when I add repository "no file board.txt" in path.
How to successfully configure IDE to able burn on it?
I use :
Link ...
1
vote
0answers
71 views
Arduino uno + cnc shield v3 + Stepper Motor Driver A4988 + AccelStepper?
I successfully run the AccelStepper examples on an Arduino Mega with a RAMPS 1.4 shield, two A4988 stepper motor drivers and two 17HS16-0284S stepper motors.
I used 3 jumpers on the RAMPS to set the ...
0
votes
2answers
47 views
Arduino & ARM - Replacement for avr-libc?
There is very cool avr-libc library that provides direct access for all functions of AVR microcontrollers. I'm writing a project for Arduino Due and I want to use timers and ISRs directly. Is there a ...
0
votes
2answers
32 views
Multiplication, division. What is wrong?
const unsigned long C1 = 30 * 1000;
const unsigned long C2 = (300 * 1000)/C1; // must be = 10
void setup() {
Serial.begin(57600);
Serial.println("\n-------");
Serial.print("C1 = "); ...
0
votes
3answers
85 views
Controlling 3 stepper motors simultaneously
I have three stepper motors connected to the drv8825 drivers to an arduino uno.
I am using the example code below (from here), which works fine for moving multiple stepper motors at the same time BUT ...
1
vote
2answers
48 views
Addressing EACH of the 3x3x3 LEDs separately
I read a few 3x3x3 LED tutorials, e.g. let us take this one:
http://www.instructables.com/id/Making-an-Arduino-3X3-LED-Cube-in-Less-Than-30-Min/?ALLSTEPS
As far as I understand, you can address any ...
0
votes
1answer
33 views
How to limit the number of message that an Arduino sends to a phone without terminating it
I just stayed on delay() since that is the only thing I know but the thing is delay() cannot be interrupted. What I'm trying to achieve with this code is:
When the soilSensor detects moisture it ...
0
votes
1answer
15 views
For loop question-Simulating a robot' s movement on a 2d array
i' m trying to simulate a robot' s movement on a 2d array. In my case, robot goes forward firstly, if it sees a engel, it turns left and continues its movement. The problem is that, i could not ...
0
votes
0answers
34 views
Using Arduino Uno to make digital LEDs go to music
I've just started playing around with Arduinos... I found relatively simple project on youtube: https://www.youtube.com/watch?v=5U354Qp6j24. I followed the instructions, loaded up the code, and ...
0
votes
0answers
18 views
How to generate Analog Signal (Voice) to the microphone
I have question about microphone and generating sound signal. I have microphone in my intercom at home. It is simple analog microphone, not digital.
What I want is to connect arduino analog ...
0
votes
0answers
31 views
LCD is not printing strings, only integers with Arduino
As mentioned in the title I'm facing a problem in printing strings in the LCD. It's printing actually weird characters.
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void ...
0
votes
1answer
22 views
HC-SR505 PIR Sensor only outputting HIGH
I recently bought an HC-SR505 Mini PIR sensor. I connected its positive to my Arduino UNO's 5v, output to digital pin 2, and ground to ground. I used Adafruit's code to test it, but all the serial ...
10
votes
3answers
133 views
Programming many Arduinos simultaneously with a wireless broadcast
I will have many microcontroller-based devices which will be independent from each other, but all will run the same program.
I would like to upload a program to all of them at the same time with a ...
0
votes
1answer
15 views
Arduino mini being programmed with CH340G
So, I have bought this USB programmer with CH340G chip on it, but it seems, that I cannot program arduino mini clone.
So, this programmer has pinout of 5V|GND|TX|RX|3V3.
I have connected TX to TX ...
3
votes
3answers
57 views
How can Arduino know that the number in a variable is a pin number and not something else?
I have a question with the topic variables.
So, a variable is a place where you can store data.
And when you make a variable with datatype int (int ledpin=13;) then you store a value 10 in a ...
-1
votes
1answer
37 views
Arduino uno not writing to file
I'd like the arduino to write to a file whenever an ajax call is made. The ajax works, but it doesn't write to the file. All other code inside the ajax handler does execute.
void handle_ajax() {
...
1
vote
0answers
36 views
Pelco D Library for Arduino
Does anyone know of any Pelco D libraries available for Arduino?
I already have a PTZ joystick controlling 3 PTZ cameras, but I would like to add an Arduino 'intelligent' controller capable of ...
1
vote
2answers
59 views
Can RX and TX be temporarily transposed on demand?
Only 2 arduinos can normally be linked via serial port because TX and RX need to be cross-linked, and connecting multiple TXs together would cause conflict.
RS485 allows multiple nodes connected in ...
1
vote
4answers
72 views
Take an Arduino or Teensy prototype to Mass production - Loading software onto microcontroller
I am developing an educational product that I would like to mass produce. I am not sure of the quantity yet, but I imagine we will make a few hundred PCBs at least to begin
I spoke with an electrical ...
0
votes
2answers
56 views
expected ';' before '{' token error
I am trying to figure out what I did wrong in my sketch. In my void loop(), at the very bottom of the sketch, my if/else statement keeps compiling with the above error. Originally, it was an if/else ...
5
votes
2answers
387 views
Design Dilema — What hardware?
I'm trying to build a smart thermostat for a particular application. I have the following design criteria and goals for the system:
Must be able to set up and monitor the device from either a mobile
...
0
votes
1answer
15 views
Details on OV7670
I am thinking of working on a project based on a camera module OV7670. I am making a security system using an arduino where detected motion (I am also using a PIR sensor) will trigger the camera ...
0
votes
1answer
52 views
Arduino Google speech api
I'm currently experimenting with my arduino Uno. I control it via an mobile (android) but wanted to just use a microphone on the board so I don't need to carry my mobile around. It is possible to ...
3
votes
2answers
58 views
Arduino cluster functionality - feasibility advice for arduinos to communicate using variable-length long strings?
My apologies. This is my first time on this site and I wasn't even aware that it wasn't some sort of discussion forum until receiving the automated response message to my already submitted vague and ...
1
vote
1answer
70 views
pass class internal function as callback
I am trying to pass a class internal function as a callback function within the class. The error behavior is similar to this problem. Whatsoever, I was unable to construct working code based on that ...
1
vote
4answers
165 views
Why doesn't this debounce function work?
Edit 2
I made a function that works, but I'm still confused about just one thing...
I'm very confused about how variables work in C++.
In this program...
boolean debounce(void)
{
static ...
0
votes
1answer
43 views
Arduino IR remote control hold value
I am trying to make a remote controlled robot with Arduino and the IR remote control is kinda weird. When I press a button, sometimes I get the right hex value, other time I get the hold value FFFFFF. ...