Arduino is an open-source electronics prototyping platform.

learn more… | top users | synonyms

0
votes
0answers
7 views

Sending message through radio module between two devices

I bought two pieces of HC-12 433 MHz radio module, some LEDs, 330 ohm resistors, tact switches, original Arduino Leonardo and Arduino Nano CH340 clone. I'm going to send message through HC-12 radio ...
0
votes
0answers
21 views

Optimizing Arduino File Selection from SD card

the following code will display the files on an SD card in an Arduino and allow the user to open a file of their choosing. Here's the code with a walkthrough of what it does. In the Init state, I ...
3
votes
1answer
23 views

Arduino Create and send data to Serial Port (Software Serial function)

I have this code written and functioning that will write out the chars in cmd to a serial port for an input of two int values. As the majority of the byte values ...
4
votes
0answers
46 views

A GUI program for a Buzzer system using arduino

At the outset, I am a beginner at python, having started out about 2 weeks back. Aim- To create a GUI program, that can adequately work as a buzzer-management system. A buzzer, like those used in ...
5
votes
1answer
87 views

Simon Says using Arduino UNO

I buit a Simon Says game using an Arduino UNO board. This was my first "real" arduino project. I would like to know how to make it better, game mecanics and code efficency. Code: ...
1
vote
0answers
20 views

The ubiquitous blink program on ATmega328P

Although there is a blinking LED, the way this comes about is quite a bit different. This could be called a dead man's switch because as long as you're holding the button down, the blinking doesn't ...
5
votes
0answers
31 views

8-bit AVR delay using TIMER0 (8-bit)

Using an Atmega328P clocked externally @ 16 MHz, this procedure is analogous to delay routines that use instructions to consume clock cycles. The intent of this algorithm is not to advocate any ...
3
votes
1answer
123 views

4x4 Matrix Keypad on Arduino UNO

I recently bought a 4x4 keypad. It is one like this: http://www.learningaboutelectronics.com/images/4x4-matrix-keypad-pinout.png Now every code I found on the net was either using a highly overloaded ...
6
votes
1answer
47 views

Arduino controller to control the backlighting of a gear selector

Background The gear selector on a car allows the driver to select which state the transmission should be in. In the example picture, one of the five letters (P, R, N, D & S) lights up to ...
1
vote
0answers
42 views

Arduino sketch running on Arduino Mega as a web server

I have Arduino Mega with Ethernet shield mounted on top running as a web server. It reads temperature, humidity, rain or not and pot soil moisture and then displays on web page. Can you please review ...
1
vote
1answer
1k views

Read and write data to/from Serial Port in C#

I am building a console application which will be scheduled in Task Scheduler of Windows to run my code every day at a set hour. Summing up, this application will read and write through serial port. ...
3
votes
1answer
88 views

Reading analog moisture signal from Arduino over USB to RPi3 and publishing via paho MQTT

This program is meant to read a moisture sensor attached to an Arduino UNO board via USB to a Raspberry Pi3 which broadcasts it over MQTT. I am looking for any constructive criticism. ...
2
votes
1answer
114 views

Arduino weather station logger

I made a program that uses the Adafruit pressure sensor, and the DHT22 temperature and humidity sensor to log pressure, temperature and humidity every 30 minutes. I left it outside my house overnight ...
4
votes
1answer
87 views

Attaching an interrupt to a member function

I am making my own optical encoders. Each of them follows the exact same structure, so I figured I'd lump all the encoder processing in a class, StepCounter. ...
4
votes
2answers
141 views

Handle data sent back over serial by Arduino

I have a machine that is being controlled by an Arduino. If I send the machine the command '9' it will send back JSON with some sensor temperatures in the format ...
2
votes
1answer
81 views

Checking for automating water topoff [closed]

The purpose of this code to is check the 3 float switches in the laminator chamber for water. The float switches vote with the majority winning. A momentary switch must be pressed for the section of ...
8
votes
1answer
76 views

Process bytes and check for start key

I am working with some wireless communication in Arduino. My data will be wirelessly received like so: 97 97 97 ... ... 979797 is the address of the transmitter. ...
9
votes
1answer
198 views

Wireless Rickroll using Arduino

This is a script I made for the ESP8266 that uses the Wi-Fi chip and creates a new Access Point every 5 seconds in order to display a message on WiFi lists on nearby devices that looks like this: The ...
16
votes
1answer
305 views

Arduino Snakes and Ladders

Here is a snakes and ladders game I made using an Arduino using a serial terminal, a set of addressable LED's to create a physical game board, a 7 segment display, and a piezoelectric to create sound. ...
4
votes
2answers
256 views

Arduino code to run an LED matrix over Bluetooth

I've made an Arduino program to run on my Teensy 3.1 board. It accepts characters and strings sent to a Bluetooth module (BC417) from any Bluetooth-enabled device and uses these to power certain pins ...
1
vote
0answers
641 views

Pong game with 8x8 matrix LED display in Arduino

I was working on programming an 8x8 matrix LED display. In particular, I am trying to make a basic version of Pong, controlled by two switches, one switch for each paddle. A ball is generated and ...
0
votes
0answers
55 views

Particle Photon C++ firmware to trigger relays

I have some C++ based firmware for the Particle Photon that I've recently refactored which could do with a review, first time writing C++. Any thoughts are welcome, including design and style (I ...
3
votes
0answers
60 views

Atmega328 watchdog, sleep and external interrupts

I have a customised Arduino board that will be connected to a battery and never power reset (it needs to be very reliable and cope with code hangs). The board will always be put to sleep when not in ...
2
votes
0answers
96 views

Fetching a weather report on an Arduino from a web service

I'm writing some code which is basically supposed to http get some information from my own website and parse it, which (finally) works. However, when I compile the code, it shows this: Sketch uses ...
2
votes
0answers
124 views

Nodejs-Compass,PID,Motors-with johnny-five

I just finish coding this code which use for control robot using compass sensor with PID control to control motors. Trying to make javascript object for necessary job. Please guide me for a better ...
6
votes
2answers
112 views

Opinion on performance increase of a robot

Background A prototype of a firefighting robot has been done recently based on an Arduino microcontroller. It has two servos, one laser LED and 2WD motors. The desktop application is done in C# to ...
7
votes
1answer
457 views

Chess countdown timer for Arduino LCD Keypad

I'm very new to C++ and Arduino, with a background in Python. I've written this code for a countdown timer and a simple menu to set the time available to each player, using button handling code from ...
3
votes
1answer
77 views

7-segment 4-digit display

Is there a better way to organize the methods within this program without compromising the clarity? Running through digits 0-9 with separate functions seems very bulky. ...
3
votes
2answers
57 views

Two similar libraries for reading pin signals

I have two similar libraries for use in an embedded system (Teensy, sort of like Arduino). One is for debouncing a digital pin, the other is for reading a capacitive pin as if it is a debounced ...
2
votes
2answers
1k views

Algorithm for motion detection using ultrasonic sensor on Arduino

I am using a ultrasonic sensor to detect motion by looking at the variance of the sensor readings, however my algorithm is very prone to give false positives thus erroneously rising a motion event. ...
1
vote
2answers
291 views

Arduino microcontroller based event handler program, send sensor readings over serial bus

I am working on a project with an Arduino microcontroller and a Raspberry Pi. The code will have to do the following: If the variance calculated of the ultrasonic sensor detections exceeds 1000, a ...
4
votes
1answer
719 views

DuckyScript precompiler for Arduino Leonardo

I've made a python program to convert DuckyScript code to Arduino code for Leonardo boards. Below you can find both the project files and a sample script. ...
2
votes
1answer
94 views

Arduino serial data input output

I have created an Arduino sketch that I am using to send and receive data via serial. It works pretty well and doesn't seem go wrong as long as the correct formats are received. Is there anything I ...
4
votes
1answer
320 views

Controlling motors using USB serial connection from Raspberry Pi to Arduino

I am working on building an RC car/robot with Raspberry Pi and Arduino. I connected Arduino to Raspberry Pi using USB and send serial commands with python. I haven't done much programming with ...
5
votes
1answer
105 views

Writing a class to hold Arduino Properties for an Arduino I2C Debugger

I have this class which mostly holds a bunch of properties and their setters. I also have wrappers for some functions of another module. Here is the class: ...
6
votes
2answers
370 views

Arduino driver for 7 segment display with bit-shift register

This code counts down from 30 to -999 on a 7-segment 4-digit display; it works but I don't know if it is a good way to do it or if it follows best practices. I want to start writing libraries for ...
3
votes
1answer
255 views

Searching for a substring in a ring queue

I am implementing a function which searches through a ring queue for a given substring. The function returns true if the substring is found, otherwise false. There is a cell containing null between ...
4
votes
1answer
220 views

Arduino code powering horoscope generator

This code works, in the same way that a cardboard bicycle works until you cycle through a puddle. It powers a box that plays a sound file in sync with some lights on movement detected by a PIR sensor. ...
5
votes
1answer
154 views

Checking that buttons are being pushed

I made a panel of buttons which run commands when pushed. In order to not have the command run on every loop if the button is held down, I am comparing the button to a previous state and only run if ...
2
votes
1answer
1k views

Driving 7-segment displays

I made a little JavaScript app here that let people generate bitmap for generating characters. Currently it generate code of a dictionary. But I want to also generate a example that let them play like ...
1
vote
1answer
89 views

Arduino Sketch for sending sensor turn on/off to computer

I'm having this Arduino Sketch: ...
11
votes
1answer
566 views

Door-opener program

I've been working on a little project on an Arduino and I need some help with making the code more efficient / cleaner. I really don't like the three for loops and ...
6
votes
2answers
904 views

Gyrometer/accelerometer sensor fusion with sigmoid transfer function

I noticed, that accelerometer and gyrometer sensor data tend to have problems. The gyrometer is not very precise and the accelerometer is getting problems with vibrations. I built a quadrocopter (to ...
0
votes
2answers
274 views

Enhancing parser for 8 byte command string (expect problems with type conversions) for Arduino/Radio communication

Because the throughput of my radio and device is limited, I wanted to compress my control string. I decided to compress the command into an 8 bytes (quasi) string (throttle high, throttle low, pitch, ...
4
votes
2answers
733 views

Simple and fair scheduler for function calls on Arduino

because Arduino platforms are fairly limited in its capacities, I wrote a small process scheduler. I append a function to an array and define a tickrate. After this tickrate elapses, the function ...
4
votes
1answer
3k views

Arduino based ultrasonic sensor program, output HIGH to control electric motor

I am brand new to C++ and am working with the Arduino micro controller. The project I've been working on for my university requires me to write code to do the following: If the ultrasonic sensor ...
3
votes
1answer
134 views

Servo commands based on serial port input

Straight to the point: Can you give me pointers on how to make this code more maintainable? In the future, I want to add more more things to this, but first it should be easy to maintain/read. Should ...
1
vote
2answers
271 views

Taking input from push buttons

I want to know if what I have coded is good enough or if there is any simpler/faster/better/less size taking substitute. I am trying to take input from push buttons and I also want to remove repeated ...
6
votes
1answer
386 views

Domotics control system

This is a project about a domotics control system based on arduino. Nothing great; it's only for testing myself and making stuff. Before I started coding this, I searched on the net for some useful ...
3
votes
1answer
4k views

PID Controller library

I'm trying to implement a PID without floating point operations on a micro controller. I appreciate all feedback I can get. Header file: ...