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.

learn more… | top users | synonyms (1)

-1
votes
1answer
24 views

Arduino program and circuit [on hold]

I need to use 1 motor and a sensor..motor should run only if in the presence of object when object is not detected it should stop....please give me the circuit diagram and arduino program
-4
votes
0answers
26 views

How can I use the same I/O pins for input and output in a single program for Arduino Uno? [on hold]

The code: int G1 = 1; int G2 = 2; void setup() { Serial.begin(9600); } void loop() { pinMode(G1, OUTPUT); // Put your setup code here, to run once: pinMode(G2, OUTPUT); delay(1000); ...
-3
votes
0answers
21 views

Combining Two Codes, from Different Sensors

I have been able to run the codes of a magnetometer, and a GPS unit separately, with the sensors with no problem. I'm trying to combine the two codes so I can run both on the same Arduino, but my ...
1
vote
1answer
19 views

LED and Switch Compolation Error Arduino 101

I'm getting an error on line 9 for some reason, (digitalWrite(Sender, HIGH);), and I just cant figure out why. My goal is to have two sets of flashing patterns, one for each switch state. I don't know ...
-1
votes
1answer
29 views

Problem with simple sound detection circuit using microphone

I am very new to this community . My first project with Arduino was using a LDR( light dependent resistor) in a circuit like this: The input i got was as expected between 0 - 1023. I then tried a ...
0
votes
3answers
42 views

and gate based on truth table

I have to code in arduino the logic gates based on the truth table with two inputs. I searched for some examples, however all that I found is using && to compared them using only onf if else ...
0
votes
1answer
58 views

Uploading Error: no programmer has been specified

Whenever I upload a code I get this error: avrdude: no programmer has been specified on the command line or the config file Specify a programmer using the -c option and try again I am able ...
0
votes
0answers
35 views

Error when trying to add and multiply

I'm having trouble getting a covariance function to compile. The error is pretty cryptic. When I comment out "sumXY=sumXY+x1[count1]*y[count1];", it compiles. Below is the error, then the code. ...
0
votes
2answers
47 views

Can I use the same Data Registry for both input and output pins?

This is for a class in which we are not allowed to use the Arduino Library (Not my choice or preference). I know to use DDRB for the B pins. This is the code that I have so far: //Global pointers ...
0
votes
1answer
34 views

Get pin input status without using the arduino library

I am not allowed to use the Arduino Library (or any Library) for this program. How would I check the input of a pin? I found two different functions: In Arduino.h: #define bitRead(value, bit) (((...
0
votes
2answers
43 views

What sensor would work for soccer ball detection efficiently using Arduino?

I want to make a soccer goal counter using Arduino and some sensors. I built using an ultrasonic sensor, but it does not detect if the ball is moving too fast. Are there any other sensors I can use to ...
1
vote
1answer
30 views

Arduino Text Scrolling on 16x02 I2c on NodeMcu (ESP8266-12)

I have managed to get my 1602 I2C LCD working on a NodeMCU devkit. I can display text parsed from the web but I am not sure how to set it to autroscroll if message is greater than 16 characters. I ...
1
vote
2answers
64 views

How can i do something like multi threathing in arduino?

I am checking for ways to implement multi threathing in Arduino, I have also tried using the library TimerOne but it doesn't seem to work, what I'm trying to make is an Arduino application then, every ...
1
vote
2answers
60 views

How to use millis()

I'm trying to have a keypad do two one of three things when a key is pressed: If the 1 is pressed I want LED 1 to blink twice then stay on If either the 2 or the 3 is pressed I want LED 2 to blink ...
1
vote
2answers
71 views

Need help with 2X3 matrix for braille

I'm an intermediate Arduino progammer, and I'm making an electronic braille display for my friend. You can think of this display as an array of 28x3 LEDs(one braille character contains a maximum of ...
1
vote
1answer
20 views

Arduino Due: multiple TCS sensors

I am trying to run 2 TCS3200’s from one Arduino Due. Next, I must increase to 4 sensors. I need to read the data from the 2 digital pins but how do I read both within the same loop rather than in ...
1
vote
1answer
38 views

Why is LED lid when pin is set low?

I made this simple piece of code, to make my LED flash.. Which it does when the pin is set low.. But how does that makes sense? #include "pins_arduino.h" void setup() { // put your setup code here,...
-1
votes
2answers
29 views

Delay In receiving data when SoftPWMBegin(); is used from SoftPWM.h library

when i use SoftPWMBegin() function in setup there is some delay while receiving data over bluetooth. And if i pressed o and 1 fastly (see in below given code), some time it receives data and sometime ...
3
votes
1answer
111 views

What's the difference between #define and const int when declaring a pin? [duplicate]

Over the course of my Arduino usage and learning, I've noticed that in some sketches people use the #define command to declare pins, while some others simply use const int for the same. My question ...
1
vote
2answers
39 views

How I can use multi sensor in one code in Arduino?

How I can use multi smoke sensor in one code? I mean how can I use more than one sensor, where both sensors has the same purpose, like use smoke sensor in multi room. Similar to this code where one is ...
0
votes
0answers
29 views

Text file from PC to SD card via Arduino Ethernet Shield?

Is possible to transfer a text file from PC to SD card via Arduino Ethernet Shield? Are there an easy way to do this?
0
votes
1answer
28 views

Trying to Serial.write RAW code properly

I have a SIM800L Module connected to my arduino Nano. I want to open a TCP connection from the sim800l module to my own server and send a text string. The connection is working however I am not able ...
0
votes
1answer
34 views

Creating a Library Help with errors

I am attempting to create a library out of an existing code to use inside of another code. To clarify, I have one code, I need to add the functionality of another code to. Instead of plopping the ...
-1
votes
1answer
21 views

where to get Arduino WIFO101 library that supports WiFi.beginAP() on board MKR1000

The sketch example from page "Wifi.beginAP()" causes compiler error because the return values are not defined for -WL_AP_LISTENING or -WL_CONNECT_FAILED. Board: Arduino MKR1000 WiFi Compiler: ...
0
votes
1answer
41 views

Arduino programming through HC06

My goal is not upload sketch to Arduino Pro mini through bluetooth module HC06. I have made a breadboard version of DTR signal simulator which takes LED status pin as a source. The output from the ...
-1
votes
2answers
49 views

Using arduino uno as a battery charger timer

My question is, can I use a Arduino as a battery charger timer, I have a 3.7 v 1200 mah lithium battery that I have been charging with a 4.2 450 ma charger for quite some time, I normally just use ...
1
vote
1answer
35 views

multiple transmitters and problem with ref

There are three Arduinos on a model. Each of them has a temperature sensor DS18B20 Dallas and an antenna wireless communication nRF24L01. There is also an independent device consisting of an Arduino ...
2
votes
1answer
76 views

How to increase current in Arduino uno?

How to increase current in O/P port in Arduino uno ? to make it 200mA How I can do this? It can in proggraming add more current Which sample way to increase current ? To control 2 Dc motor which ...
0
votes
0answers
25 views

Trouble uploading code due to 'lack of storage'(?)

I've recently bought a Arduino Uno (so I'm a beginner with electronics :$) but I have trouble uploading any code using IDE. It keeps saying there's no storage and that it can't find the library. Does ...
2
votes
2answers
39 views

Arduino Wire.h send double to lcd

I'd like the double number 200.00 shown as 200.00 on my LCD screen. For instance, when I pass just a number (int) like 40 to the LCD, it uses it as an ASCII code to show a character on the display. ...
2
votes
1answer
39 views

Strobe Frequency Calculation, how its done?

I'm using the Arduino sketch for LED stroboscope found here: http://mehax.blogspot.co.uk/2011/02/arduino-stroboscope.html. Also below, I've inserted the loop part where this calculations are made: ...
0
votes
0answers
34 views

Programming Arduino MEGA2560 using Arduino Uno

I have already used the Arduino Uno to burn the bootloader on the Arduino MEGA2560 board, and I can program the the Arduino MEGA2560 board using the USB connection to the computer. However, I am ...
0
votes
2answers
55 views

The most effective way to format numbers on Arduino

I made a big search about how to Format Numbers with the Arduino. I want to format unsigned Longs into a String in this format: "23,854,972". The most of the snippets I found work only with the ...
0
votes
1answer
54 views

how to use capacitive touch keypad without using CapacitiveSensor.h Library

i want to use multiple capacitive touch keypads with arduino uno but number of IO ports are not enough. So I decided to use MSP23S17 port extender. Now i have to find some methods to sense the touch ...
0
votes
1answer
79 views

How to split a string into substring Arduino

I'm about identify myself stupid, howcome I couldn' t figure out how to split a string into substring using arduino, even after 10 days of searching. The number is fact... So, As Mr.Arduino.cc says: ...
3
votes
1answer
300 views

OOP vs procedural programming on arduino

It seems like the majority of Arduino applications are written without using classes / objects. Is there a reason for this? Does is slow down the Arduino or somehow present undesirable behavior?
0
votes
0answers
33 views

Arduino 1.6.X on NetBSD/FreeBSD

I run arduino-mk 1.0.1 and would like to know if someone has had any luck getting 1.6.X working on NetBSD/FreeBSD. If I understand correctly, its core is java, and I can run most java programs. Are ...
0
votes
2answers
44 views

Problem with code for IR remote controlled robot

I recently wrote the code for this project but it's weird because when I press button on the remote nothing shows up on the Serial Monitor and consequently the robot doesn't respond. I know it's not a ...
0
votes
1answer
34 views

Using logical operators

This is a snip it of code from a program I am writing. I have the program turn an LED on and if a button is pressed when the LED is on I want it to add to a counter and print the counter value. The ...
0
votes
1answer
29 views

DMX dimmer appears to receive data from Arduino but connected lights do not respond

I'm trying to control a DMX dimmer (eurolite ES-12 IEC DMX Switchback) through an Arduino Mega. In an earlier test, we were able to make one RGB DMX light run through the color spectrum. Now, a ...
-1
votes
0answers
33 views

How to use 2 motor drivers with one iduino uno? [closed]

:) I'm just new to this field. I already asked a lot of people but i still cant find the answer on how to make this work. http://www.e-gizmo.com/oc/index.php?route=product%2Fproduct&product_id=491&...
0
votes
3answers
58 views

Is the Arduino bootloader really the Atmel bootloader? Can I use Flip to upload?

I've been asked to do a small project using an Ada BlueFruit board. It has a ATMega32U4. The 32U4 comes from the factory with a bootloader pre-installed. I've never used an Arduino before, but I have ...
0
votes
4answers
43 views

Can't use enum as function argument

I declared my enum and called it Dir. I wanted to use value of that type in my function Move(). Here's the code: enum Dir { forward = 1, backward = 2, left = 3, right = 4 }; void Move ( Dir ...
1
vote
2answers
80 views

How do I split a number into individual digits?

How would I split part1 into 2-3 digits and put them into num1, num2, and num3? int FMSTATION = 10250; int update_display() { int fm_station = FMSTATION ; int part1; int part2; part1 = (...
0
votes
1answer
40 views

Homemade fan - motor madness

i hit the forums again with my homemade fan idea, this time i got the right servo. everything works fine until i try turn up to the 2nd speed of the servo, the buttons just go mad and the response in ...
0
votes
3answers
64 views

Installing Pyserial

I will be running my CNC Via Arduino UNO R3, so i have found out that it runs on GRBL and that i need to load Python and Pyserial and a graphic interface. Loaded Python 3.5.2, no problems, opened dos ...
0
votes
1answer
20 views

Servo City PT785 with HS785 servo. help

I have acquired a Pan Tilt system that uses the hitec HS785 servos. These servos are (3.5 to 6) multi turn "SailWinch" servo. I was hoping someone here has Arduino code that runs them full range. I am ...
0
votes
1answer
23 views

Why does my servo execute an action in the beginning when the odds are almost 0?

I made a servo motor turn if the result of random(0, 10000) is less than or equal to 1. If that is the case, the motor turns to 130 degrees, to 50 degrees, and then to default position(90 degrees). It ...
0
votes
1answer
101 views

how to run servo 180 degrees and stop

im creating a pir motion sensor doggy door the problem im having with it is it runs 3 times ive figured out how to pause when reaches 180 but not how to stop. i was thinking i could use detach my ...
0
votes
0answers
62 views

Sound module WT588D-28P Library Development

I have a WT588d-28p 32M sound module that is currently using a WT588D-16P library. I do not have the expertise to modifie the 16P library up to a 28P version, but I have accumulated a large amount of ...