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
30 views

How can I understand the circuit diagram for Arduino Starter Kit Project 4?

I have acquired the arduino starter kit project book, and the explanations seem at times confusing and difficult to understand. Concerning the above circuit diagram, the book states (I am ...
1
vote
1answer
46 views

Unable to replicate Arduino code into ATmega8 code

I am trying to replicate an LTC Audio Decoder code from Arduino Uno into AVR ATmega8 which I got from here. My Arduino Uno code is working great. Here is my Arduino Uno code: #define one_time_max ...
0
votes
2answers
86 views

Issue with IF statement condition

I am using 2 accelerometers connected to an arduino. The code below does not work. > if((acc1 >= 20 && acc1 <= 40) && (acc2 >= 20 && acc2 <=40)) //If acc1 is ...
0
votes
0answers
40 views

Low Power Mode on Blend Micro

I am making a project which envolves an arduino (redbear blend micro) . Basically I followed the getting start procedure to put things working in the IDE and it's done. For now, in order to save ...
0
votes
0answers
17 views

How to track movement with accelerometer

this is first time working with arduino. I'm trying to make a DIY Harry Potter Wand that turns on an LED if you wave the wand in a certain way. I'm wondering how to get the arduino to track a ...
0
votes
0answers
16 views

Sending Bluetooth to tx RX pins, then to a speaker?

I just got my arduino uno and Im just breaking the ice on learning how to program it. Well ive decided to make it into a bluetooth stereo that also powers some LEDs at the same frequency so they will ...
1
vote
1answer
35 views

Inheritance not working as expected

Short version: This is a lighting control project. Some of the clases are Pin and Channel. Channel contains a Pin. Pin is a base class for DigitalOutPin and will be the base class for AnalogOutPin, ...
0
votes
1answer
37 views

Standalone Arduino with ATMEGA328P / Serial working, but serial programming not (only once after buning bootloader)

For my master thesis I've designed a board with an ATMEGA328P-AU as micro controller. As I want to use some libraries and I like the simplicity, I want to use "Arduino" to program it. Everything ...
0
votes
0answers
24 views

Aruino pro mini not accepting new code

I recently purchased an Arduino pro mini from Amazon, and a ch340g serial adaptor to program it. When I first used it, I only used the simple blink program, just editing the delays. This worked great, ...
0
votes
0answers
40 views

Arduino crashing and rebooting

I have recently written a program which is supposed to change the duty-cycle to keep the feedback voltage measured on A0, A1 constant. The problem is that the Arduino will start crashing at pretty ...
1
vote
1answer
41 views

Atmega2560 + weather station freezing

i made a weather station which is build on a ATmega2560 mini pro, Esp8266 module which communicate with atmega on serial1 which sends values to thingspeak, an TSL2561, 2.4 tft lcd, BMP180, DHT22 and a ...
0
votes
2answers
43 views

how to use an object of a class within that same class?

I want to write a tree data structure made up of Nodes, but I'm having a problem with my Node.h class as each Node need to have a reference Variable to other Nodes,it's children. which ends up giving ...
3
votes
1answer
26 views

How to Implement Simple, Quick HMAC on Arduino

Hi I am a research student working on securing the communications in Controlled Area Networks (CANs), and I am using Arduinos to simulate one of these CANs. My goal is to use HMAC to implement ...
0
votes
3answers
74 views

Building a Vector class in Arduino

I'm struggling with this issue that I can seem to get around of. When defining a vector class, I'm seeming to get some issues when deleting the allocated pointer. Oddly enough, this only happens ...
0
votes
2answers
82 views

Would rewriting my code in C help reduce RAM usage? [duplicate]

So my program fails to run because there is not enough room for my variables as well as the Arduino Core and Stack. I can't find any more ways to optimize my program so I'm thinking about just ...
0
votes
0answers
16 views

Modscan Request format

I have downloaded the modbus RTu library from below link. The code seems working for me. I Need help in Modify sending request format with same library function. Here is My part of code. I am also ...
3
votes
1answer
29 views

RC Car Hack Issue

I am trying to hack a cheap RC car as to be able to control it using my Arduino. I took apart the cars remote controller and found the pins that make it go forwards, backwards, left, and right. So I ...
0
votes
0answers
19 views

CC3000, How to find Client IP?

I have asked here, Arduino.cc forum, and Adafruit forum this question related to finding client ip using the Adafruit CC3000 Shield. Answer from TisteAndii here: Client IP seems to be on-track, only ...
-1
votes
2answers
56 views

What would be the code for using Arduino UNO to alert by sound or LED when it detects a certain position through GPS?

I am in grade 6. I have a very nice pet dog in my house but it often enters Mom's kitchen to spoil all the foods. So I am thinking of a device to attach with him which can locate its position. But I ...
0
votes
2answers
33 views

Operating two functions simultaneously

I have connected a bluetooth module(HC-06) and a voice recognition shield(EasyVR) on an arduino UNO. By using an another HC-06 on the another arduino(so, 2 arduinos and 2 HC-06 totally), I am going ...
5
votes
2answers
255 views

Arduino's digitalWrite, precautions for direct port manipulation?

I stumbled upon this piece in digitalWrite. I'm unsure why clearing interrupts and setting/resetting SREG is neccesary here. Can anyone shed a light on this? uint8_t oldSREG = SREG; cli(); if (val =...
4
votes
1answer
38 views

RFID/NFC Tag get data from wordpress MySQL

I have a local workshop for students to teach them 3D printing/woodworking I want to know if its possible to create RFID/NFC tags using wordpress data from MySQL or HTTP/HTTPS. Web Scenario : I ...
1
vote
2answers
38 views

Does Serial.read() ever return a character?

I'm trying to program my Arduino Mega to work with a TSL1401 line scan module and while looking over someone else code I came across this: void loop() { int b = Serial.read(); //Reads ...
0
votes
1answer
31 views

Serial command request

#include <avr/wdt.h> #include "Timer.h" #include"glob.h" int LED = 13; Timer t; String Old_string; String New_String; String Received_String; const byte numChars = 32; char receivedChars[...
1
vote
1answer
25 views

MIDI controlled analog RGB LED strip (code problem)

I have a an Arduino Uno doing PWM on an RGB analog LED strip ala the Adafruit guide: https://learn.adafruit.com/rgb-led-strips?view=all. I've written a sketch that accepts MIDI data over USB and uses ...
-1
votes
2answers
55 views

IF, ELSE IF functions not working with analogRead

not sure what is going wrong in the code below, but it's a simplified code of a larger piece I'm trying to debug. I notice that the code seems to skip to the else statement even though the if ...
1
vote
2answers
82 views

How to upload one program into several Arduinos at once?

I am trying to upload a single program to a number of Arduinos one by one. But it is time consuming. So I would like to know if there is any way to upload the code at once to multiple Arduinos. I ...
0
votes
2answers
40 views

Interrupt numbering

I'm using an Arduino Mega and four of its interrupts. Each interrupt is only used to start/stop a timer, depending if it's rising or falling, so effectively runs the same function. Does anyone know if ...
1
vote
0answers
31 views

Slice byte-stream into bit pieces

I receive byte data from a RS232 device with "Serial.read();". Now I need to slice this down in bit-pieces: value1: 15bits value2: 7bits value3: 9bits value4: 12bits and so on Data from the stream (...
-1
votes
2answers
130 views

Ughh… My Arduino Code ain't workin'… And i just couldn't see any problems… Any thoughts?

There's Latest Update! So i'm workin' on a counter just for fun. How it works is when you press BUTTON1 the LED Lights up red, the buzzer beeps and the variable "counter" adds one to itself; After ...
1
vote
2answers
29 views

calling a random function number

I have a recurring problem that when I'm controlling leds, I make several different functions for different fx and just want to trigger them randomly but having a hard time to formulate it in an ...
0
votes
1answer
56 views

String comparison

[![Out put file][1]][1]I have simple code written in arduino. I am sending serial command via comma separated values. I have string in format. if the first 2 comma separated value from PC matched then ...
0
votes
1answer
153 views

Find remote ip address TCP

Found this "Remote IP of TCP Socket" at: https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc3000/f/851/t/380635 How would this be used; Adafruit CC3000 library, "Utility\socket.h?" ...
0
votes
3answers
76 views

Serial is freezing arduino

I'm using a LinkIt ONE Arduino-like to send sensor data via MQTT. It always worked very well, then out of the blue, it stopped printing anything using Serial.print(); But if I ommit the "Serial....
0
votes
1answer
50 views

Possible Arduino Uno c++ compiler bug?

I recently gave the students in my Arduino-based programming class a project to write some simple unit tests and fix the bugs that they encountered as they did. The class in question mostly stores a ...
0
votes
0answers
41 views

Arduino Oscilloscope Graph Output

For physical Arduino debugging purposes, I decided to make a simple Arduino oscilloscope (on a Nano v3) based on Sofian Audrey's 3-channel oscilloscope code which is at the heart of this instructable. ...
3
votes
2answers
89 views

Is there a way to pause Program execution?

I understand that Arduino programming is procedural and not so much Object Orientated and also that the Arduino or AVR are only single core processors and any kind of "Multitasking" or "Threading" is ...
0
votes
1answer
23 views

Detect if multiple variables are the same?

I'm setting a series of variables with: uint32_t currentLedColor[9] What I'd like to check is if certain ones of those are the same. Basically want to say if currentLedColor[0] and currentLedColor[1]...
0
votes
1answer
26 views

Getting RGB values from camera

I have a camera I'm planning on attaching to an arduino uno, that I want to take pictures and extract the average RGB value from each image. This is the camera I have, but I've now realized that it ...
0
votes
1answer
35 views

Need Help with Switch Case commands/receiver and lcd screen project?

I am doing a project with a receiver and transmitter and i am trying to get a message to print onto the screen. If anybody has any experience with this could you please help! I am trying to use a ...
0
votes
0answers
21 views

How to control motors without conflict from joysticks?

I am building an ROV that will control motors with 3 2-axis joysticks. I have four horizontal motors that are vectored in this configuration in order to allow for more axes of motion such as crab and ...
0
votes
1answer
21 views

Can I use Arduino Nano V3 to program another arduino (Pro Mini)?

I was planning to buy serial to USB converter (FT232RL) to be able to program Arduino Pro Mini. But the shop nearby offers Arduino Nano V3 at almost the same price. Could I use this Arduino instead (...
0
votes
2answers
42 views

How do I pass an Int Array into void for a foreach loop?

I know its probably an odd question...but I found a workaround for a foreach loop in C. I have a whole bunch of int arrays that I would like to be able to pass into a void, which has that foreach loop ...
0
votes
1answer
30 views

Using buttons with Arrays

I am trying to write a simple program that will cycle threw an array using push buttons. My current version of the program uses if statements and print lines. My goal is to have contact information ...
0
votes
2answers
45 views

Include Git tag (or SVN revision) in Arduino sketch?

Is there any way to get the current Git tag/commit identifier into an Arduino sketch binary? For normal desktop program development, you can pull some tricks with the Makefile (as pointed out in this ...
1
vote
0answers
47 views

How do I use the NRF24L01? [closed]

I am a high school student and I need to build a remote controlled car for a school project and I have to use arduino. I am fairly new to arduino, but I understand the basics. Also I'm kind of ...