Arduino

A

Arduino

Official Arduino Discord - Discuss all things Arduino!

Join

hardware-help

coding-help

official-product-help

project-showcase

general-help

pcb-help

adafruit-help

official-product-help

robotics-help

sensors-help

coding-help

hardware-help

esp-help

pi-help

i2c-serial-help

ESP 32 locking up

I am using an esp32 to create an airsoft bomb where the players have to use switches and a keypad to disarm a bomb which plays an explosion sound when the timer runs out. the problem is if I enter the code wrong 3 times, it locks up and refuses to continue. I have to restart the whole thing. To be honest I used Chat GPT to help me with the code. it works perfectly other than the issue of it locking up....

RP 2040 - PIO programming in Arduino IDE on linux

I've got a few Picos, I'd like to try programming PIO. Quick search shows mostly micropython tutorial (which are useless to me), or 1-3 years old tutorial for windows workflow. Can anyone point me to a good tutorial for programming PIOs on linux within Arduino IDE preferably, or explain how to get started?...

Double output in 16x2 LCD low level implementation

I'm interfacing an LCD with an atmega328p and programming it in assembly. the problem is I'm getting double characters printed in each iteration of the print loop. also, there's a "garbage" byte at the beginning. code: https://pastebin.com/Xdw4MSw7
No description

Serial Monitor

I am making a CNC machine from DIY Machines on Youtube and I am getting zero response from the Serial Monitor—how do I fix that?
No description

Receiving incorrect data through Serial

I'm trying to interact with UART using assembly, but I can't seem to get it to print the right data. the main things to look at are putc and puts. everything works fine only if I used one of them and not both in one program....

How do I code the Adafruit Mini LED Arcade Buttons?

As the title mentions, i'm wondering if there was a library or some examples when coding the mini led arcade button from adafruit. https://www.adafruit.com/product/3491...

Bluepad32 issue with Whitelist

I'm using Bluepad32 4.1.0 with arduino IDE 2.3.6 When pairing a controller with a whitelist (i made sure its the right one) I get : DS4: Failed to create virtual device Control not allowed: address not allowed I am modifying a sketch to use for a competition, which is why I'm trying to implement the whitelist....

My setup is looping? LEDs and oled going crazy..

idk why but my LEDs blink and my oled goes on and off really fast

BASIC STEPPER CONTROL WITH PI AND WAVESHARE STEPPER HAT

I have tried for hours to get the stepper motor to just spin a couple of times with cpp and all it does currently is lock the motor. there are no wiring issues because im literally using a waveshare stepper hat so it couldn't get any simpler. I had no problem with arduino and individual a4988s in the past either. ``` include <lgpio.h> #include <unistd.h> // for usleep...

I'm trying to make an override code

So, for context, I am making a system where the servo motor is constantly on an automatic sweeping motion. The micro:bit sends an analog signal from pin 0. If its high, it will activate an override code Problem is... the override code doesn't work. And the servo either freezes or the override doesn't activate....
No description

Code not working

my code isnt wokring. I cant see my website https://github.com/AltRavenAR/HackProjects For soime reason it doesnt even show up on github...

Accessing arduino cloud api via python giving error 405

Hi all! I'm trying to access my arduino cloud via the python api. I tried following the tutorial in the docs at https://docs.arduino.cc/arduino-cloud/api/arduino-iot-api/ however when I use the script they suggest on there it get an error 405 with reason: Method Not Allowed. (see full stacktrace below). I've checked my api keys and even making the same request through postman which all seems to work fine (mostly). I do have an organization so im wondering if the issue is because theres no clarification for personal vs org account but i'm not entirely sure how i'd add that. I can add the python code if you're curious (its essentially the copy paste from the website). Thanks in advance! Stacktrace: ``` Exception when calling ThingsV2Api->list_things: (405)...

Need help in Adruino Uno + MPU6050 + SIM800L EVB

I have a current project but can't seem to make it work. Here's what I want to do. (MPU6050 detects a movement, then it will trigger a buzzer that will run for about a few seconds. Then it will send SMS alert to my phone.) It would be better if there's a turn on and off switch for the whole system. Thank you!...

Recording sound as .wav

so I am trying to make arduino uno code that records audio on SD from A0 when button A1 is pressed but I am getting wierd files that can't be played can any one tell me why?

how to attachinterrupt()

so i was trying to attach a interrupt to a pin(18) on arduino mega 2560 R3 and i wrote this code so i want the cursor to display a character and blink its like a typing system .The interrupt is not given response by the microcontroller i dont see any character blinking also i have double-checked the wiring this is the code -

Need help for inverted pendulum project

Hello I have some questions about a inverted pendulum balancing project that I am doing and its my first time here is this the right channel btw? Im trying to make an inverted pendulum project and I am using an arduino uno, Nema 17 stepper motor, rotary encoder with 600pulses/rev on a 2020 profile. The hardware is kinda done and the pendulum is a simple pvc pipe i found lying around and the angle is read by a rotary encoder attached at the pivot. My lacking is mainly code/logic wise I watched a video about deriving the equations of motion for a classic inverted pendulum (https://www.youtube.com/watch?v=5qJY-ZaKSic) and I want to ask, With the data read/given to the arduino (ANGULAR DISPLACEMENT, ANGULAR VELOCITY, ANGULAR ACCELERATION, LENGTH OF PENDULUM, MASS OF PENDULUM) it should be using those values and calculating for the acceleration needed for the cart to move to try and balance the pendulum right? I am quite stuck because in equation 6 there is a variable F which to my knowledge is Mass*Acceleration so then do I just use the equation 5 to find the acceleration or does both equations 5 & 6 need to be used together to make such a thing?...
No description

Unable to report value over USB

Hi everyone, I've been trying to teach myself how to create USB HID devices and I've gotten to the point of creating my own descriptor and having get sent sucsessfully over usb for the host to understand what my device does. The problem I'm having now is trying to report data to the computer. Maybe I'm doing something wrong and IU just dont see it or its something else. Thanks for anyones help! IDE 2.3.4 Leonardo ...

2 MUX

Can someone smart tell me where I am making a mistake when reading the inputs of 2 MUX? https://wokwi.com/projects/430668107021337601...

Keyboard using keypad and keyboard libraries together

I am trying to make a keyboard script for an stm32 based development board using the keypad and keyboard libraries. I used a default script from the keypad library then added a keyboard function from the keyboard library to send keystrokes to the connected computer. My problem is that the script below does not send any keystrokes. I am able to send a key when I have a keyboard.write function alone, but not when it is inside that if statement. I can also send the pressed letter through serial (using an UNO, not the stm32 board as It doesn't connect to the serial monitor) so I know that the keypad script works alone. ```#include <Keyboard.h> #include <Keypad.h> const byte ROWS = 4; ...

I need help with my Arduino project for school

Hello thanks for reading this😁, I'm currently making a robot for school that should move his servo motors and must play saved wav files from the SD card, when a letter (for example h) gets sent trough Bluetooth (with HC-05) to the Arduino. My only issue is that for some reason I can't use the HC-05 and the SD Card Memory Modul at the same time. I can use the HC-05 while SD Card Memory Modul is unplugged and the letters arrive at the Arduino and the servo motors will move without any issue. And I also can send letters trough a USB cable connected to my pc, while the HC-05 is unplugged, and those letters arrive to the Arduino, the SD card will play the wav file and will move its servo motors without any problems. But every time I use both at the same time (HC-05 and SD Card Memory Modul, that's my goal) it seems like the letter gets sent to the HC-05 but will never arrive at the Arduino itself. I think the problem could be that the SPI of the HC-05 and the SPI of the SD Card Memory Modul are interrupting each other somehow, but I almost don't know anything about SPI lol😅. I used Chat-GPT and watched tutorials online but nothing worked for me, I don't know how to fix this issue . ...
No description