Photograph via snooOG

An unofficial place for all things Arduino!

We all learned this stuff from some kind stranger on the internet. Bring us your Arduino questions or help answer something you might know! 😉


655,189 Subscribers


[noob] - new nano not showing as a serial device in linux

I have just bought a starter kit with a Arduino nano. When I plug the usb into my linux box the nano itself has one solid light and one blinking light.

on the linux side there is no evidence that the usb/serial device is connected.

if I list active serial devices the only one is /dev/ttyS0 (and that shows up in the IDE).

If run # dmesg -c after a unplug/replug nothing is shown.

my user is part of dialout group

is there some nano driver that I need to install or something?

10:21 UTC


Playing buzzer music with IR remote. Why doesn't the music play for the second time?

What I'm trying to do

I wired up buzzer and IR receiver. I'm trying to play music with buzzer using IR remote. I intend to make the project so that if I press button 0, playtestSong() gets called to play some music on the buzzer if I press button 1, playHipHop() gets called and so on.

Overview of the Issue

However, in reality, when I press button 0, the music plays the first time but none of the buttons work for the second time.

If I remove playtestSong(); then remote works fine. The print statements inside the if statement for respective buttons gets executed. For example, if I press button 1, 2, 3, it outputs

You pressed button 1
You pressed button 2
You pressed button 3

What I tried to fix it

I added print statements before, after, and inside the playtestSong();. There is another print statement Serial.println("after if"); at the end of the if statements. If I run it and press button 0, the print statement before, inside, after playtestSong(); gets executed and works fine for the first button press.

First time I pressed button 0:

You pressed button 0
Playing test song
Done with test song
Exited out of the function
after if

However, if I press it again. Only "after if" gets printed. The whole if statement doesn't seem to be running.

Second, third, fourth time I pressed button 0:

after if
after if
after if

I figure out the issue but I don't know how to fix it

So I printed buttonCode after the if statements. Serial.println(buttonCode); and when I run the program and press button 0 it only print 3910598400 (the button code associated with button 0) first time but seemingly random number thereafter.

Example pressed button 0 four times:


Example reuploaded and pressed button 0 four times again:


When I removed playtestSong(); it consistently prints 3910598400

Example pressed button 0 four times:


But why on earth would playtestSong() affect the variable buttonCode?

The code


#include <IRremote.hpp>
const int IR_RECEIVE_PIN = 9;

void setup() {

  IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK); // Start the receiver


void loop() {
  if (IrReceiver.decode()) {
    unsigned long buttonCode = IrReceiver.decodedIRData.decodedRawData;

    // Button 0
    if (buttonCode == 3910598400) {
      Serial.println("You pressed button 0");
      Serial.println("Song done");
    // Button 1
    else if (buttonCode == 4077715200) {
      Serial.println("You pressed button 1");

    // Button 2
    else if (buttonCode == 3877175040) {
      Serial.println("You pressed button 2");

    // Button 3
    else if (buttonCode == 2707357440) {
        Serial.println("You pressed button 3");

    // Button 4
    else if (buttonCode == 4144561920) {
      Serial.println("You pressed button 4");

    // Button 5
    else if (buttonCode == 3810328320) {
      Serial.println("You pressed button 5");

    // Button 6
    else if (buttonCode == 2774204160) {
      Serial.println("You pressed button 6");

    // Button 7
    else if (buttonCode == 3175284480) {
      Serial.println("You pressed button 7");

    // Button 8
    else if (buttonCode == 2907897600) {
      Serial.println("You pressed button 8");

    // Button 9
    else if (buttonCode == 3041591040) {
      Serial.println("You pressed button 9");

    Serial.println("after if");

    IrReceiver.resume(); // Enable receiving of the next value



const int BUZZER_PIN = 8;

// Note frequencies in Hz
const int NOTE_B0  = 31;
const int NOTE_C1  = 33;
... other notes here
const int NOTE_D8  = 4699;
const int NOTE_DS8 = 4978;

void playNote(int note, int duration) {
  tone(BUZZER_PIN, note, duration);
  delay(duration * 1.30);  // Adding a delay to separate the notes
  noTone(BUZZER_PIN);  // Stop the tone

void playtestSong() {
  Serial.println("Playing test song");
  playNote(NOTE_E5, 300);
  playNote(NOTE_DS5, 300);
  Serial.println("Done with test song");


I'm using https://github.com/Arduino-IRremote/Arduino-IRremote library

08:00 UTC


Trying to send a specific voltage range to A0-A4, but it seems to have an effect on the neighboring ports. Any ideas?

07:27 UTC


Can i possibly transfer Audio from an ISD1820 to my laptop???

My project consist of recording answers of random questions and get them on my laptop, the "recorder" i chose for my project is the "ISD1820" but i'm not sure if i can transfer the audio to my laptop through an Arduino Uno R3. Can someone help me or tell me what microphone module i can buy? It's for a school proyect literally.

1 Comment
02:15 UTC


Thermal imaging system

Hi everyone, I want to know if there are any Arduino-compatible thermal imaging systems on the market, I searched online but I couldn't find any. I am looking for something that would output a view like this


Thanks for your help :)

02:11 UTC


Wiring check.


Just making sure if i have my GPIO pins set as inputs, that this wiring would work. All good?

02:00 UTC


Controlling led strip with ATmega8

Hey guys new to programing and circuits. I have been able to program an atmega (or so I think) just trying to problem solve if my circuit is built right.

(As in the picture) pin 4 (digital pin 2) to data wire of the led strip through 330ohm resistor. p5 (D3) to button 1 (b1). P6 (D4) to b2. P7 (VCC) connects to power of leds. P8 (GND) connects to ground of leds. P9 and P10 connected to 16mhz crystal with 22p capacitors connecting each side to ground. P11 (D5) connected to B3. Also all buttons are connected to ground and theres a 10uf capacitor between power and ground.

Here is the start of the code as well.

#include <FastLED.h> #include <OneButton.h>

#define LED_PIN 2 #define BTN_PIN 3 #define BTN2_PIN 4 #define BTN3_PIN 5 #define NUM_LEDS 72

CRGB leds[NUM_LEDS]; uint8_t patternCounter = 0; uint8_t patternCounter2 = 0; uint8_t patternCounter3 = 0; OneButton btn = OneButton(BTN_PIN, true, true); OneButton btn2 = OneButton(BTN2_PIN, true, true); OneButton btn3 = OneButton(BTN3_PIN, true, true);

If this is the wrong place let me know so I can post it somewhere else. Any help would be greatly appreciated. Thanks

00:38 UTC


SoftwareSerial issue

Im working on a project involving an Arduino nano 33 BLE rev2, and am working on a Mac. There is an HC-05 bluetooth module connected to it, and I'm trying to receive IMU data, namely from the gyroscope and accelerometer, and output it to either the serial monitor or to a separate text file. I saw a YouTube video that did such a thing, and it involved using SoftwareSerial to, as I understand it, change the TX and RX pins to different pins. When I run the code that includes #include <SoftwareSerial.h>, it tells me that the file or directory can't be found. I thought that it was included with the Arduino IDE, but maybe not?

1 Comment
00:59 UTC


Parking assist sensors with arduino projects?

Has anyone ever used parking assist sensors with their arduino projects? I would imagine them being more robust than the HC-SR04 ultrasonic sensors, but how else would they compare? More/less sensitive? Better range? How did you use parking assist sensors?

22:57 UTC


how to program an Atmega644a with a t48 programmer

how do i upload code written in Arduino ide onto a Atmega644A. i have a t48 programmer

21:33 UTC


Stabilizing my Standing Desk

I want to use an arduino and some motor to push and retract from wall on a button or switch, thereby greatly increasing the stability of my desk. I want suggestions for the motors as I couldn't find what i was looking for

21:31 UTC


UnoKeys. Macros for pc using Arduino Uno https://github.com/Carloux/UnoKeys

Hi, im new in this reddit, but i wanted to share this thing i made,



You can make pressing buttons on the Arduino execute keyboard keys or mouse clicks and more, you can also add delay to key combinations to make macros, you must follow the README for the program to run.

CONTEXT: I was looking online for a code to make keyboard macros with an arduino uno, but everywhere they said that I needed an arduino pro micro or a leonardo, so I got to work and made a solution, and since it was supposed to be something It couldn't be done, I wanted to share the program with everyone.

21:06 UTC


vin as a power supply..

I'm using a nano to power servos that operate at 6V. Since I can't use the micro USB(it's max V is 5V.) Can I connect the external 6 DC wall wart to the Vin pin? Then where will I plug into the servos?

21:17 UTC


How do I send data over range?

For context, I am building a model rocket that tracks its speed and altitude. I want to be able to have the information in real time, how can I do this? It’ll need to be in the 2000m range.

20:50 UTC


Building a TARDIS from scratch

So this was a project I did about 10 years ago as a graduation gift for my kid. Everything was built up from scratch using balsa wood, and airbrushed using model railroad paint. It has an ATtiny85 and a cheap digital record/playback board inside. When turned on the top LED fades in and out multiple times as it plays "the TARDIS sound". The interior lights (LEDs) for the top 4 signs stay on constant. Yes; there is Gallifreyan writing on the inside and all kinds of Easter eggs hidden away in it. Eventually all of the electronics were stored up inside the TARDIS and some of it is in the base pedestal.

It was a labor of love and I spent over a year making it (and remaking parts of it) until it was as close to "perfect" as I could get it. The dimensions are totally accurate and scaled down. Sadly the source code is either lost or on another older machine (I looked for it). The ATtiny85 controlled the top light to fade in and out and the 4 signage lights individually, and also triggered the playback module. The playback module was one of those cheap "press a button to record 20 seconds of digital audio, press another to play it back" swag devices given away at some convention I had attended. After 10 years of being moved around from apartment to apartment the wires have now come loose so I'm in the process of repairing it and re-implementing the sound playback using a DF Mini sound module.

I showed the images to some friends and they suggested it might make a good "Look what I made!" post since I've never really posted much about it, even though I took pictures all along the building stages. The full build gallery (107 images!) is here on imgur. The following images are just a sampling of the build that included some of the Arduino/electronics images.

the final (almost completed) results

all hand made using balsa wood




building out the top

the top light is a 0.5 cm section of a clear plastic Bic pen, with lines drawn on it


complete with Gallifreyan writing on the inside

hand for scale

programming and testing the top light as it slowly fades in and out

to get an idea of scale, that doorknob is a pin head

testing the top light and the 4 LED's for the signage at the top for all four sides

the guts just before assembly. Used a tiny 3.3V LDO voltage regulator to power it all



20:23 UTC


Need help with rfr leonardo board steering wheel.

My steering wheel works fine but sometimes the steering center changes a little bit. But when I plug in buttons on my board and start pressing the buttons the encoder input just freezes and stops working for a few seconds. I am posting the diagram I used to set up the circuitry.

1 Comment
20:10 UTC


Timer question

I know an Arduino has a timer inside it as I did the led on and off but what is it's maximum parameters? Can it time over an hour? 24 hour's? I mean if I want a lamp to come on every 8 hour's or so for a few minutes can the Arduino board do this or do I need an add on? Thanks in advance

18:13 UTC


Help with Arduino

Hi I'm working on an iron man suit slowly but Shirley,

I want to find a board that would allow 3 button inputs as well as 3 light outputs and 2 servo motor outputs and 1 sound output.

Not sure if I would be able to find all that on 1 board that's small enough or if I would have to find a couple different boards

Just looking for recommendations and links for boards, servos and ect. Any help woould be great.

16:25 UTC


arduino screw board

Looking for a way to easily connect wires to my arduino I have found this but unfortunately this is not compatible with my arduino pro micro. Does anybody know how it’s called, have a link to one for a pro micro or know of any better alternatives?

13:29 UTC


Would I be arrested/booted from a plane if I carry my Arduino Starter kit in carry on/check in luggage?

So I started learning Arduino programming for my self and just for some fun little projects - like automatically watering my plants, etc. I landed a full time job and would need to fly to another state for it. Is it a good idea for me to bring my Ardunio kit (battery, motors, wires, arduino and modules, etc) in the Elagoo Starter Kit pack with me on the plane?

Or is this clearly illegal? I honestly dont know since Ive never brought anything like this sbefore.

I found a post from 8 years ago about this too, but i didnt really get a super clear answer...

If anyone has done this before, Id appreciate your honest experience. Is it a problem? I would just buy a new kit in my new residence if needed.

18:54 UTC


How to make money with projects?

Hi everyone, so I’ve been making a bunch of projects over the years and have a bunch of experience working with esp32’s(+ other microcontrollers) and arduino coding, and made things like robotic arms, keyboard pianos, displays, and more. I’m looking to try and profit off my expertise, maybe by selling projects or code to people, whether it be something like commissions and I ship out a project, or people ask for a code online. How should I start? Social media? eBay?

17:59 UTC


What are my odds of building something like this with an Arduino (lipo balance charger)?


I've seen a few schematics elsewhere, but obviously I'd like to approach the quality and functionality.

What books are recommended?

Thanks so much


15:52 UTC


Using arduino uno for physics experiments

Hello everyone, do you guys have any ideas on how to use the arduino to conduct physics experiments ( any branch of physics : nuclear/particle/electromagnetism/quantum...) ( perhaps using a laser 650 nm red HeNe laser?)

Maybe like : Measuring the resistance and resistivity of materials Magnetic force Anything related to kinematics like free fall , projectile motion, speed of light, specific charge of electron, a simple Spectrometer, the photoelectric effect, frank hertz experiment, balmer series , zeeman effect, radiation.....

My questions is how can we do any of these if possible, like what kind of hardware to use, the connection and schematics, code, etc..

15:03 UTC


Using Arduino to control SK6812 RGBW stripes via sACN

Hi everyone, for a project I'm currently working on I want to control SK6812 RGBW stripes from a GrandMA console. I'm currently using sACN for this, as it seems to be the easiest out of all the ways I've tried so far.

I'm able to control the stripes with the code below, they are however pretty slow in updating. According to Google, sACN is updated at up to 40 Hz when channels are changing, my stripes look to be updating around 5 Hz (just from looking at them). For tests, I simply output a white chaser on my GrandMA console, so the output into the network shouldn't be the issue, I think it's with either the stripes themselves or my program. I'm unsure whether this is an optimization issue or something else, that's why I've tried removing the Serial output, but that doesn't lead to any noticeable difference.

I'm using a D1 mini pro (so the ESP8266); the only thing I've wired is the data pin of the stripes. For sACN, I'm using the ESPAsyncE131 library by forkineye and the NeoPixel library by adafruit.

Thank you in advance for any advice.

#include <ESPAsyncE131.h>
#include <Adafruit_NeoPixel.h>

#define UNIVERSE 1                      // First DMX Universe to listen for
#define UNIVERSE_COUNT 1                // Total number of Universes to listen for, starting at UNIVERSE
#define DATA_PIN 2                      // D4 = 2 on D1 Mini Pro
#define NUMPIXELS 54                    // Number of pixels per stripe
const char WIFI_SSID[] = "ssid";
const char WIFI_PWD[] = "pwd";

// ESPAsyncE131 instance with UNIVERSE_COUNT buffer slots

Adafruit_NeoPixel stripe = Adafruit_NeoPixel(NUMPIXELS, DATA_PIN, NEO_GRBW + NEO_KHZ800);

void setup() {
    //  Serial.begin(115200);
    WiFi.begin(WIFI_SSID, WIFI_PWD);
    while (WiFi.status() != WL_CONNECTED) {
        //  Serial.print(".");

void loop() {
    if (!e131.isEmpty()) {
        e131_packet_t packet;
        e131.pull(&packet);     // Pull packet from ring buffer
        for(int led = 0; led < 55; led++) {
          stripe.setPixelColor(led, stripe.Color(packet.property_values[led*4],
14:35 UTC


ESP8266 - Receiving data from sensor to print in Java Application

Hi guys, I am doing an obstacle avoiding car which will also going to map the room to my java application. Right now with serial connection I can collect and able to print the data coming from the sensor in my application. But I want to collect it without a cable plugged in. I found people using ESP8266 for these kinds of projects, but couldn't able to find a good resource to learn how to do exactly. Can anybody give me some insights about it?

1 Comment
14:05 UTC


My mini robot nano with arduino uno

11:41 UTC

Back To Top