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
0answers
2 views

Nokia 5110 Screen Pixel by Pixel

I have got this LCD screen I'd like to be able to decide every pixel status of the screen. Do I need to work directly with the buffer or is there another method?
1
vote
1answer
8 views

Capacitive “keys” press event registration issues

Seeing as this is my first post I would like to thank everyone ahead who take their time to delve into my whimsical code, whoever you may be, be merciful ;) For one of my uni projects, I would like ...
0
votes
0answers
5 views

Where am I supposed to get an I2C BUFFER_LENGTH defined?

I am using a BLE nano - as soon as I try to include I2Cdev.h and compile, I get this error: Arduino\libraries\I2Cdev\I2Cdev.cpp:276:62: error: 'BUFFER_LENGTH' was not declared in this scope How ...
0
votes
2answers
32 views

Compare const char * to const char

Using ArduinoJson I have assigned a value such as; const char* id = root["id"]; in the original JSON id was "1" if (strcmp(id, "1") == 0) { // this executes } I have an array of structs that ...
3
votes
1answer
27 views

Combine bits from two ports into a single byte

I'm attempting to read the values of 8 pins at a time into a byte. The obvious answer to this seems to be the Port registers, however with the way the Arduino is wired, I'd have to split my read ...
0
votes
1answer
8 views

How to send a group message to multiple receivers using GSM900 and Arduino Mega2560?

I'm working on a project and it can send to one receiver only. What I need is to send a message to multiple receivers. I need a code sample that would satisfy my needs. Please help! I need to finish ...
3
votes
1answer
26 views

SD print in script works in setup but not loop

I am a bit of a novice with the arduino, and have had to learn a lot for my High Altitude balloon launch. I am getting ready to launch this, but for some reason, my datalogger, printing to an sd card, ...
0
votes
1answer
22 views

How to extract the last byte out of an IP adress

Newbie question: I need to pass the last byte of a local IP as a parameter. Eg.: when Ethernet.localIP() returns 192.168.0.100, I need to extract the 100 and put it in a char array or string. Anyone ...
0
votes
2answers
25 views

How to set address for using more than MPU9250

I am trying to build a project that contains more than one MPU 9250, until now I'm still confused to MPU9250. If I were going to that, does anybody here know how to set addresses to each of the MPU's ...
1
vote
1answer
32 views

exit(0) function shows up an error

So I have been trying to write a code where I use the millis() function to print the milliseconds of on-time of the board using Serial. But the condition is I want to stop printing the value once it ...
3
votes
1answer
35 views

Arduino IDE Based Data Logger - Stops Running

I have created a data logger that writes to a MicroSD on a user defined interval. The data logger also has the ability to use an xBee unit to transmit the data received to a base station. This is ...
0
votes
1answer
25 views

Convert Long to binary - least signifant bit first

I have found an Arduino function which converts a 2-bytes-long-value to a binary value. e.g. I call sendCommand(0x05) And it gives me an output: 00000101 void sendCommand(unsigned long command){ ...
1
vote
2answers
69 views

How to learn electronics/programming with Arduino?

I want to learn core and mechanics of microcontrollers with Arduino, and I don't really know where to find good source of knowledge. Every Arduino related tutorial is about very basic stuff like ...
1
vote
2answers
149 views

Multithreading with Arduino

Well i've just started learning the concept of Multi-threading with C++ and immediately a bunch of questions came to mind about the possibility of using Multi-threading with Micro controller as a ...
0
votes
1answer
33 views

Interfacing Arduino with matplotlib animation

I've also asked this question over on stack exchange so I'll link the actually question Here The short story is I have a plot that updates in real time from data collected on an arduino. The plot ...
0
votes
1answer
35 views

Prevent Switch case from not being complete

I got this program. It controls a refrigeration room using a ds1280 temperature probe. The thing is, sometimes the probe reach 7.00°C then the refrigerattion cycle start (refrigeration cycle is on a ...
2
votes
2answers
63 views

Arduino Variable Data Type?

Is there a variable data type available for Arduino? I have a class that should have a member that will differ in data type, in the past I have used the "variable" keyword in c++ but when I tried to ...
1
vote
1answer
23 views

I2C connection with MT9D111 camera module, strange results after writing registers via i2C

I am currently working on a camera platform based on the MT9D111 module from Micron. The first thing to do is to write the configuration to the numerous registers of the chip which is done via an i2C ...
0
votes
0answers
40 views

Arduino MEGA and ESP8266

Hi I am Using ESP 8266 to Send Serial Data To My Arduino Board using single click ( or post Action )..... My arduino mega controls 6 lights by reciving a character.... for example: if i type 'U' in ...
0
votes
0answers
27 views

AC control with Arduino Uno R3 and triac

I have to coils ;L1 powered with 36V AC and L2 has to be powered with 72V AC or DC only for 2ms at exact point of max voltage in L1.I use 0 crossing signal and optocoupler to command the triac, but I ...
1
vote
2answers
56 views

Problems with Draw Loop using u8glib

I am using an Arduino Mega and a 12864ZW LCD with the u8glib library and the following code to draw to the LCD: U8GLIB_ST7920_128X64 Display(LCD_E_PIN, LCD_RW_PIN, LCD_RS_PIN, U8G_PIN_NONE); void ...
0
votes
3answers
47 views

How to check if a pin is set from bank?

How would you go about checking if an input pin has been set using the entire bank? I am thinking that I need to use bit twiddling with a bit mask but I have not used this enough to figure out how to ...
0
votes
0answers
28 views

High current draw when serial monitor is on

I have a SPI accelerometer and I'm testing its current draw. When the serial monitor is switched off, it draws 300uA. However, when the monitor is switched on, it draws 1000uA. If the monitor is ...
5
votes
0answers
105 views

Event driven programming

I have ran across a couple of different event libraries that are available on the AVR and Andruino but I am not sure which one is the best option. What I would like to do is design my program in a ...
0
votes
0answers
22 views

Intel Edison Setup Fail - OS X

I was wondering if anyone else had issues setting up Intel Edison (with Arduino breakout board on OS X I have downloaded Intel Dev Kit and followed instructions whilst the Edison is plugged in both ...
1
vote
0answers
28 views

Phone-Arduino system

Is there any application or program that can allow a user to change particular parts of a code? The user types in some defined "instruction" into their smartphone and it changes say the intensity of ...
4
votes
2answers
151 views

Simple URL decoding

How can I do a readable, small, smart and good URL decoder in Arduino? Now I'm using this code: String GetRidOfurlCharacters(String urlChars) { urlChars.replace("%0D%0A", String('\n')); ...
1
vote
1answer
34 views

Arduino using LCD

I am building a project that is using A12864ZW 128X64 LCD, the question I have is should there be anything in the circuit to prevent damage to the Arduino Mega or the LCD? I am using this example here ...
1
vote
1answer
16 views

Addressing contents of array using incrementing variable

Why would this simple code which prints out array values give the right value 240 when the array is addressed with index directly addressed by number but give 184 when addressed usin a varibale n that ...
5
votes
2answers
113 views

OOP vs Inline with Arduino

I have been programming for quite a while now but I am new to Arduino and AVR Programming. The main question I have about programming these Micro-controllers is are there major differences in ...
1
vote
1answer
53 views

Building an adjustable low frequency PWM controller with Arduino

I am looking for a way to create an adjustable PWM controller capable of modulation frequency from 0-100 (more preferably 0-1000) Hz, duty cycle from 0-100%, and able to accept a voltage range of ...
0
votes
2answers
51 views

Connect Digital monitor to Arduino?

I need a small display with ~ 5 digits. The display needs to show number of visits to my site in real-time. (Every time someone visits it needs to increase by one). I thought to create an app, that ...
0
votes
2answers
123 views

uint8_t * to integer and string

Convert text array/buffer to integer and string. hi! i'm sending text to an arduino and the output of that library is a uint8_t array. Atm the text send is a number between "0" and "1023" void ...
1
vote
1answer
45 views

Problem with for loop

I'm having trouble with the syntax of code. I want to have the motor turn when the next average the program measures is 100 or more greater than the previous average it measured. I don't know how to ...
0
votes
0answers
29 views

No values are updated counter TCNT1 Timer 1 Arduino UNO

I am a Spanish student and I'm involved in a project with ARduino UNO and Joystick Radio control. I'm trying to measure the duty cycle of a radio control and not the values are updated, ie not ...
0
votes
1answer
30 views

arduino PWM temperature inexpected results

I am making a system which regulates the temperature of a plate. using the PID library I programed the system as followed: /******************************************************** * PID Basic ...
0
votes
0answers
19 views

My ports look wierd

So i want to create a graphical interface to show temperatur from a device connected to my arduino board. To do that i use Processing 3. The problem is. In processing 3 you need to enter the com port ...
0
votes
2answers
68 views

Error in my Arduino code “ error: expected unqualified-id before ‘if’ ”

I cant seem to find this error is: elevator_bug_2.ino:38:1: error: expected unqualified-id before ‘if’ Here is the code: // these constants won't change. They are the // lowest and highest ...
1
vote
1answer
218 views

Graph plotting on Python using Tkinter Canvas

I'm trying to plot a graph with python using the canvas widget, I'm currently sending data in from an arduino sensor sketch ..does anyone have an idea on how I can plot this graph in real time on ...
1
vote
1answer
57 views

Timer interrupt won't work if the ISR is not set

I am using an Arduino Mega 2560. I have a code in a c file, that looks like this: #include <avr/io.h> /* for DDRB, PORTB, etc. */ #include <util/delay.h> /* for ...
0
votes
1answer
14 views

Broken Score on Game Sketch

I have modified the code for Flappy Duino to give me a score at the end of the game. Here is the code: #include <SPI.h> #include <Adafruit_GFX.h> #include <Adafruit_PCD8544.h> ...
1
vote
4answers
42 views

Create a device to detect object state

Here is what I want to do or get it done (since I am not a embedded guy)... create a prototype with Arduino to detect open window/door of my room using camera(image processing/object state ...
0
votes
2answers
69 views

Formatting and code errors?

Hello I have managed to get both the Adafruit Datalogging shield walk-through and this individual code working http://www.learn.parallax.com/reed-switch-arduino-demo separately, but trying to combine ...
0
votes
1answer
49 views

Can anyone explain how this code can be converted to work on a Arduino Uno [closed]

I was hoping someone could help, im totally new to this. I wish to use this code for a Raspberry Pi on an Arduino Uno with the Adafruit SD data logging shield. It is for recording reed switch closures ...
0
votes
0answers
52 views

Electromagnetic levitation

I'm a newbie to arduino and I'm attempting a project involving an electromagnet oscillating quickly causing a magnetic object to float in mid air. I'd like to know basically if this is possible using ...
2
votes
1answer
33 views

Passing a static array to a function

I have a functon that creates a instance of KeyReport and I want to fill statically the KeyReport.keys array. I'm new in the Arduino world so I'll put a example to explain it better: void ...
1
vote
2answers
49 views

Using random() in a header file

#ifndef FOO_H #define FOO_H struct Foo{ int randInt = random(0, 101); }; #endif I have a header file with a struct like above but when I compile I get this error: 'random' was not declared in ...
0
votes
1answer
31 views

Issue with leOS2 for one-time tasks

I'm trying to use the last version of leOS2 scheduler from Leonardo Miliani ( https://github.com/leomil72/leOS2 ) but I have a strange behavior with a very simplistic ONETIME task. Platform : Arduino ...
1
vote
1answer
104 views

A whole basic game project Arduino

Firstly, I know that I have already posted this. I do not think anyone here is stupid so: The game is: a power source connected to 6 buttons connected to 6 LEDs. you press them all in the randomly ...
0
votes
1answer
64 views

Help with arduino car project

So in computer engineering I've got to make a arduino based car, I've added a whole bunch of features such as IR tracking, obstacle avoidance(proximity sensor), optical tracking(follow a black line), ...