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

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

Code-Review For Save & Play Robotic Arm

```c++ #include <Servo.h> const int maxFrames = 200; const int servoCount = 3;...

Part 3

Follow-up of last post. The code has changed since then. Problem 1: Input not adding to totl...

Part 2 of help!

Remember the thing of the string to double thing? I need help again! I made a few changes to my code For some reason the screen says: Type item price start over?nclDo...

Can't turn string into a double SOMEONE HELP ME

For some reason line 38 returns an error. The user is expected to enter the price of an item on a 16-key pad. Press * to accept, # to decline. It's expected to convert the price thing to a double to add to the total, but why it aint working?
No description

Save & Play Arm “Animation”

I’m making an arm controlled by potentiometers and servos. An idea of mine is that a button will be made for recording a series of potentiometer inputs which can then later be played with another button. My questions are: A. How this would even work B. Does the Arduino Uno even have enough storage for that...

Arduino Giga code crashes(board flashes red) "randomly"

* What is this The following code is an arduino giga project with the arduino giga display shield. The project's goal is for the board to display 2 different group of buttons, users and modes. The person managing the board will have to choose a mode and then select an user to send the selected mode to, uppon which a mqtt message will be send to the user's topic....

Timing LED challenge

Task Blink at least 3 LEDs at the same time. Each LED should blink at a different interval. For example the first LED blinks every 200ms, the second one every 500 and the third one every 900. Rules...
No description