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)

0
votes
3answers
46 views

Can't program Arduino via Bluetooth (HC-06) with a Mac

I bought a HC-06 Module for my Arduino Uno the other day, yesterday it arrived and I'm having trouble using it with the Arduino IDE. I set it up, connecting 5V, GND and RX/TX crossed. After a bit of ...
0
votes
2answers
47 views

Programming an Array of ATTiny

I am designing a board for my electronics project and i am using a number of ATTiny85 for it. The ATTiny's will be SMD so i will not be able to remove them for programming. Moreover all of the pins ...
2
votes
1answer
57 views

Random(min,max) Function only giving ~50 range no matter what the values?

I can't get the min,max range to function properly. Monitoring the serial, only gives out ~50 difference from the min. I then added truerandom.ino to try to fix, but no help. const int ledPin = 13; ...
1
vote
1answer
41 views

Wake up atmel-328 with external interrupt.

I have a atmel-328 with a xbee . I want to reduce the consumption of the battery. So I have kept the ardunio in sleep mode and it wakes up on a pre set time using jeelib laibrary. I have also kept ...
0
votes
1answer
48 views

Turn Arduino into a Bootstrap Loader for MSP430 programming [closed]

How can I turn my arduino into a USB Bootstrap loader for programming the MSP430g2xxx series chips?
0
votes
1answer
51 views

Question about viability of building a Bill Counter machine

I have a need for a bill counter at my current job, but besides counting bills we also could use a machine to count admission cards. The idea is to either buy a bill counter machine (like those that ...
4
votes
1answer
62 views

How can Arduino source code be tested automatically (continuous integration)?

I'd like manage my Arduino source code (projects and libraries) under source control with continuous testing. How can I automatically compile the code with continuous integration tools, to make sure ...
0
votes
0answers
32 views

TCS 230 colour sensor using arduino

i m working on a robot that can sense different colours and then follow a particular path accordingly.previously i was using "pulseIn" function to read the out frequency but the results are not very ...
0
votes
0answers
23 views

Buffer serial data till condition met?

I have an Arduino attached to an accelerometer sensor. I'm looking to detect the motion of a head shake sideways. While I am able to stream the readings from the sensor, I am unsure how to buffer ...
0
votes
1answer
58 views

coding standards for bigger projects

I'm starting a decently sized project around arduino/ATMELavr, and I came to wonder if there are any commonly accepted C/C++ coding standards or style guidelines specifically aimed at embedded ...
0
votes
0answers
58 views

7 Key Educational Piano with Capacitive Sensor

I am working on a project for grade 10 computer science. I am supposed to make a piano that has 7 keys using a capacitive sensor, and the piano is supposed to teach you songs like Twinkle Twinkle ...
0
votes
3answers
174 views

Programming Arduino

I'm new to electronics. Professionally I'm a software developer. I want to know whether it is possible to program Atmel AVR 8-bit and 32-bit Microcontrollers using Arduino IDE. If yes could any one ...
0
votes
0answers
27 views

Enabling quicker and more accurate MindWave Mobile detection?

Currently I am trying to get a Mindwave Mobile device to operate with an arduino uno. I'm following the guide here. However the sample code given doesn't work very well. I have been trying to get a ...
0
votes
2answers
59 views

Error: Function not declared in the scope

I want to make a timer library. The cpp file I have written is: #include "avr/interrupt.h" #include "Arduino.h" #include "AllTimer.h" AllTimer::AllTimer() {} void AllTimer::dofun(void) { TIFR1 ...
0
votes
3answers
172 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
1answer
33 views

Multiple Definition of “_Vectors”?

I'm working on an arduino project that uses the GSM Shield and the eHealthSensor from Cooking Hacks. However I ran into an issue in which the interrupt vectors from the header/cpp files used are being ...
0
votes
1answer
24 views

Use website to communicate with Arduino WirelessProtoShield

I have a small office with wireless network, is it possible to make a wireless doorbell? Practical example: Arduino is connected to the main wireless network and has a static ip, i have a website that ...
0
votes
2answers
45 views

how to make arduino as mind thought reader?

I'm trying to create arduino base mind reader... And for that I thought that EEG electrode connected to arduino and then the data send to arduino in 01 form .. But I facing problem in how to convert ...
3
votes
1answer
124 views

What are the benfits of global variables over static class members?

On an embedded system we use global variables often to keep dynamic memory consumption on heap and stack low. But global variables are also considered bad programming practice if they aren't used in a ...
0
votes
3answers
71 views

Program got so many errors about expected ) or ; before either

This is my first time to try program arduino, and I am clueless. I have a friend who told me about things work, and he told me the programming language is C (or similar to C) which we have learned in ...
0
votes
0answers
23 views

Leonardo with xbee shield?

I'm trying to get a XBEE shield to operate on an Arduino Leonardo. Usually i use the AltSerialLibrary to emulate an extra serial for the xbee. However since the Leonardo comes with two sets of serial, ...
0
votes
2answers
57 views

Controlling Arduino from Raspberry Pi

I am trying to control an Arduino Leonardo R3 to run some code when "triggered" from a Raspberry Pi, this would be in a loop so that it can be ran multiple times. I have setup the Raspberry Pi and ...
1
vote
0answers
50 views

Controlling Arduino from Raspberry Pi [duplicate]

I am trying to simply send a digital output from the Raspberry Pi to trigger some code on an Arduino. I have setup the Pi with the digital output working fine (tested using LED) however, I cant seem ...
1
vote
1answer
75 views

How to avoid the code interrupting itself?

I have this code, which I am using with a potentiometer to control the speed of a automotive fuel injector. In it, I have specified how long the injector shall stay open by using the delay functions. ...
0
votes
1answer
109 views

“void does not name a type”

Hi I'm new at this and can't figure out why I get this error "void does not name a type" on lines 3,5,8,26 // _2-5 set Debounce Button const int BUTTON=2; const int LED=9; boolean lastButton = LOW; ...
0
votes
1answer
54 views

Serial.write() datatype issue in application @ xbee(API frame)

I have 5 int values which i want wirelessly send to another xbee. My problem is how do I give hexvalues (0x4E) in Serial.write() when i have an integers values (say current, voltage etc)?"** Current ...
2
votes
1answer
51 views

Homemade soil moisture analog value reading jumping from 0 to max

I made a soil moisture sensor out of two metal poles, adjustable resistor, for a project I am making. The first run with the project the sensor worked amazing and gave clear and concise readings, ...
0
votes
0answers
49 views

Setting up Xbee Coordinator and router in API?

I am currently trying to get a remote xbee router API to send a frame to a coordinator hooked up to XCTU (Display frames received in XCTU window). I am using the examples in the arduino's xbee api ...
0
votes
0answers
17 views

Recieve data only from XBee coordinator to router?

Currently I have a XBee setup with 2 routers and 1 coordinator. The first router sends data to the coordinator, which is then supposed to filter the data and then pass on the respectively value to ...
0
votes
0answers
41 views

How to return the value in Arduino function (that can be read by the connected device)?

Right now I have an RC car program for Arduino. The code is like this: void loop() { distance = Dist.getDistanceCentimeter(); if(distance<=5 & distance>1) if(Serial.available()) { ...
0
votes
0answers
55 views

Get the uploaded code from arduino by using arduino IDE 1.0.6

Recently bought a arduino device which already have program, it is model AR-293D and I have already connect it with my PC(windows 7) through usb when I open the IDE , It seems there is no function ...
0
votes
1answer
44 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
1answer
346 views

Difference between void setup() and void setup(void)

As it says in the title. I have been searching but I cant seem to find the answer. What is the difference between void setup() and void setup(void) as well as void loop() and void loop(void)?
2
votes
3answers
72 views

Convert long to char array and back

I'm trying to store a state in my data logger. I can read/write fine to SD, but I can't wrap my head around reading/writing a long value correctly - I've build it down to converting it to char array ...
0
votes
1answer
43 views

Assigning values to char array causes program to not run

I have the following code: #include "LCD12864RSPI.h" #include "DFrobot_bmp.h" #include "DFrobot_char.h" #define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] ) unsigned char wangzhi[]=" www.DFRobot.com ...
0
votes
1answer
33 views

How to use bitset/read on 16bit numbers (Arduino)

I'm working on an Arduino powered Tetris game. To keep track of the pieces that have fallen and become fixed I have an array of bytes byte theGrid[] = { B00000000, B00000000, B00000000, ...
0
votes
1answer
44 views

Multiple timers with different frequencies

I have to use multiple timers (for example, to blink different LEDs) with different frequency (for example, 7.3 Hz). Cannot you tell me, what is the preferred way to implement it? Just now I use one ...
0
votes
1answer
147 views

How to make Arduino communicate with MySQL?

I am trying to send data from my Arduino to my database but it seems that the process is not successfully beginning. Here is my code for Arduino: #include <Process.h> #include <Bridge.h> ...
0
votes
1answer
63 views

lcd.print and 2D arrays

Click here to see my program running I have created a 2D array (see my full code below), and each row contains one state of a battery here is a schematic : row [0] : "▯▢▢▷" // this row represents ...
0
votes
0answers
20 views

Arduino Transceivers

I've been using a raspberry pi for a while now and wanted to attempt some home automation. From reading around I've seen lots of people saying that the raspberry pi can't generate the timing for the ...
-4
votes
1answer
80 views

Garbage value Serial Monitor

I am building my own arduino.Here is my code Below. I found code working for Digital Ios like blink example ; analog reading, Problem i am facing in Serial Monitor.Whenever i open Serial monitor i get ...
0
votes
1answer
64 views

Delay not working in function other than loop

So I just got an Arduino and thought I would play around a bit. However not five minutes in I already ran into a problem. I tried programming a simple SOS blinking light sequence. To get rid of code ...
0
votes
2answers
39 views

releasing memory in sub-function

I'm doing a program who get a line from the SD and shows it, this function is called getData() FULL CODE: #include <SD.h> #include <MemoryFree.h> File myFile; int stringIndex = 0; int ...
0
votes
1answer
86 views

MFRC522 minor problems

I'm working on a small project for a presentation. My goal is to read the UID of multiple Mifare Classic cards and compare it to a hardcoded list for different actions. All is well (the reading and ...
0
votes
0answers
45 views

Configuring XBee coordinator to propagate data to routers?

Currently I have three XBee. Two is configured as routers and one as a coordinator. For serial data that is being sent using two of the xbee (router-->coordinator, coordinator --> router) this works ...
0
votes
0answers
67 views

Using XBEE on Relay Shield v2.1?

I am unable to get the XBee running on my relay shield. I'm looking to have two Xbee communicate with each other. Here is a test script I drafted. // We'll use SoftwareSerial to communicate with the ...
0
votes
1answer
98 views

What in the example code is different from my test code? LED matrix lights up differently

I'm trying to get my LED matrix to run Conway's Game of Life. After 4 different pin configurations, I've finally been able to run a separate test code, that lights all the LED's in order, and then ...
0
votes
1answer
48 views

Getting Push Button Logic To Stick?

I'm trying to get a sensor to activate if a push button is clicked. And deactivate when a certain condition is met and reactivate when the push button is pressed again. #include <SPI.h> // ...
0
votes
1answer
42 views

Lily Pad mp3, nested loops with timing and play randomly choosen mp3, coding problem

The best way to explain my problem is in form of code... const int ringerPin = A0; const int offhook = A4; const int onhook = A5; void setup(){ pinMode(ringerPin, OUTPUT); ...
0
votes
0answers
63 views

Checking string condition?

I'm looking for my Arduino board to jump to a function based on an if condition, where a string (content) is checked to see if it matches the word FALLEN. However, the if condition never occurs ...