
Why my Arduino shuts down when I connect it to the Vcc of the sensor?pls
My sensor is the SFR05 ultrasonic distance and the arduino uno

My sensor is the SFR05 ultrasonic distance and the arduino uno
Each time that I try to connect the sensor Vcc pin with the Arduino it shuts down. Somebody can explain why please?
Hello!
So I am trying to do some Sony 9-pin communication, and I have been informed that in order for it to work, I need to set " jumpers " on the RS422-shield. However, how do I acquire those jumpers?
I'm sorry if I sound like a noob, because I am. I am still new to all this. So all help is appreciated.
We tried to connect it for hours, but we couldn’t make it work. We’re using Arduino Uno R4 wifi.
Can anyone help?
i recently got this and now its not allowing me to upload sketches to it anymore, and it connects and disconnects all the time
and now it just light up a little bit with the RGB led it would be super nice if i didnt have to buy a new one...
thanks for answering,
Hyy beautiful souls! thanks in advace for the kind help! a month ago I was able to connect my arduino one (clone) to vcv through hairless midi and loopmidi to convert the signal coming from plants in VCV (I found a post here explaining all the procedures and it worked!) It's been a month I didn't use it and now, trying to connect it again is not working anymore, hairlessmidi does not see the port I create on Loop Midi, but I think also Loop midi is not recieving the signal from arduino, althouth it itself is working properly ( setting up it first on IDe I can see the signal coming there). Cant uderstand what have happend because before it was working perfectly. Maybe some stupid windows updates? I am on Wind 11. And of course I am closing Ide when I open loop and hairless. Any suggestion? Pleasee I was so happy before now I am really upset!! Thanks and hugs from Italy
Hi reddit,
I'm building a custom controller for a school project. I have an Arduino Pro Micro (ATmega32U4) with a dual-axis analog joystick (KY-023) and four tactile buttons that will be soldered onto a perfboard (currently still on the breadboard to try out which makes it more difficult to determine whether the problem lies in the code or the wiring). The goal is to use the joystick to control the mouse cursor (relative movement) to demonstrate different input strengths.
What I've already done:
What actually happens:
What I expected:
Smooth, proportional movement – small joystick tilt → slow cursor movement, full tilt → faster movement.
I suspect the linear mapping plus the fixed delay is the problem. I've read about using acceleration curves (e.g., exponential) but I'm unsure how to implement one without introducing lag. Could someone point me to an example or explain how to apply a non-linear curve to the mapped values before calling Mouse.move()?
Thank you for any hints.
Here is my current code (just for the joystick im trying to keep it as simple as possible so i can understand what i actually did)
#include <Mouse.h>
int xAxis = A0;
int yAxis = A1;
int deadzone = 10;
void setup() {
Mouse.begin();
Serial.begin(9600);
}
void loop() {
int xRaw = analogRead(xAxis);
int yRaw = analogRead(yAxis);
int xMove = map(xRaw, 0, 1023, -10, 10);
int yMove = map(yRaw, 0, 1023, -10, 10);
if (abs(xMove) < deadzone) xMove = 0;
if (abs(yMove) < deadzone) yMove = 0;
Mouse.move(xMove, yMove);
delay(10);
}
Hello! So a few days ago I have tried to simulate a Sony 9-pin communication by running code from the github: GitHub - hideakitai/Sony9PinRemote: RS422 Sony 9-Pin Protocol Remote Controller of VTRs for Arduino · GitHub in Arduino IDE. I had my PC connected to an Arduino, which was then connected to a RS422-shield, which was then connected to a male 9-pin cable through the terminal block, which then was connected further into a " slave device ". However, when I ran this code:
// #define SONY9PINREMOTE_DEBUGLOG_ENABLE
#include <Sony9PinRemote.h>
Sony9PinRemote::Controller deck;
void setup() {
Serial.begin(115200);
Serial1.begin(Sony9PinSerial::BAUDRATE, Sony9PinSerial::CONFIG);
delay(2000);
Serial.println("Running like that");
deck.attach(Serial1);
// get device status
deck.status_sense();
if (deck.parse_until(1000)) { // wait until response comes (timeout = 1000ms)
if (!deck.is_media_exist())
Serial.println("ERROR: there is no media!");
if (!deck.is_remote_enabled())
Serial.println("ERROR: remote control is disabled!");
if (!deck.is_disk_available())
Serial.println("ERROR: removable media is not available!");
if (!deck.is_stopping()) {
deck.stop();
deck.parse_until(1000);
}
deck.device_type_request();
if (deck.parse_until(1000)) {
Serial.print("device type = ");
Serial.println(deck.device_type(), HEX);
if (deck.device_type() == Sony9PinDevice::BLACKMAGIC_HYPERDECK_STUDIO_MINI_NTSC) {
Serial.println("this device is BlackMagic HyperDeck Studio Mini NTSC");
}
} else
Serial.println("ERROR: device type request failed!!");
} else {
Serial.println("ERROR: device status request failed!!");
}
}
void loop() {
// if previous command has completed (response has come)
if (deck.ready()) {
static bool b = false;
if (b)
deck.play();
else
deck.stop();
b = !b;
delay(2000);
}
if (deck.parse()) { // if some reply has come
if (!deck.ack()) { // if the reply is not ack
deck.print_nak(); // print nak
}
}
}
I received the error message:
ERROR: device status request failed!!
So it seems like my Arduino tried to send a message but was unable to receive any response from the slave device. I believe it's because the cables protruding from the RS422-shield's terminal block were connected to the wrong pins on the male 9-pin cable, so I reconnected them. I connected the cable protruding from the letter " B " on the terminal block to pin 2, the letter " A " cable to pin 7, " Z " cable to pin 8 and the " Y " cable to pin 3. The ground cable I connected to pin 4. I have tried attaching pictures on how my connection looks like, but I wasn't able to get a clear picture, so apologies if my pictures look blurry.
So now I want to ensure I am all set and I can run a successful simulation when connecting the Arduino. Do you think this should work?
...because I have heard it might be possible that the RS422-shield requires some extra " jumpers " to make it work, which I am not sure about. But do you think I am good to go, or do you see some problem here that I am not seeing?
I appreciate all help!
its because i have a pretty bad wifi connection for my computer, so it would be nice if i could download the boards without the Library Manager
So trying to connect 6 servos for a project but I have a Mac…
It worked for one servo but now it’s not accepting any input and giving me error codes
I searched online and read about the Ch340 but the only ones I have seen are from 2016-2022 which may be outdated
I tried one and it didn’t work even after resetting everything
Is there something I can do to make it compatible with a Mac?
My 5 Channel IR sensor array Value got stuck on 981 analog value and it's doesn't change until i completetly touch the ir sensor with the surface no gap between them. I thought the sensor it damaged so i changed to new one but problem not solved its showing same thing with new ir sensor array. So i think its not ir sensor problem maybe the code i wrote. So can anyone help me with this issue 😭
I downloaded an arduino project online, but the code won't compile. Can someone help me?I get an error message that says:
In file included from C:\Users\joshu\AppData\Local\Temp\.arduinoIDE-unsaved2026314-15064-1n28yyq.xhpef\sketch_apr14a\sketch_apr14a.ino:1:
C:\Users\joshu\OneDrive\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:35:2: error: #error HID Project can only be used with an USB MCU.
35 | #error HID Project can only be used with an USB MCU.
| ^~~~~
In file included from C:\Users\joshu\OneDrive\Documents\Arduino\libraries\HID-Project\src/HID-Project.h:39:
C:\Users\joshu\OneDrive\Documents\Arduino\libraries\HID-Project\src/SingleReport/SingleAbsoluteMouse.h:28:10: fatal error: HID.h: No such file or directory
28 | #include "HID.h"
| ^~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
Here's the code
#include "HID-Project.h"
//NOTE!! You need to add the above HID-Project library for this code to work.
//https://github.com/NicoHood/HID
//The device will show up as a gamepad/joystick in windows called "Seeed"
const int pinEject = 2;
const int pinArm = 3;
void setup() {
pinMode(pinEject, INPUT_PULLUP);
pinMode(pinArm, INPUT_PULLUP);
// Sends a clean report to the host. This is important on any Arduino type.
Gamepad.begin();
}
void loop() {
//check EJECT
if (!digitalRead(pinEject)) {
static uint8_t count = 0;
count = 0;
while (count<=2) {
count++;
Gamepad.press(1);
Gamepad.write();
delay(50);
Gamepad.release(1);
Gamepad.write();
}}
else {
Gamepad.release(1);
}
//Check ARM
if (!digitalRead(pinArm)) {
Gamepad.press(2);
Gamepad.release(3);
}
else {
Gamepad.release(2);
Gamepad.press(3);
}
Gamepad.write();
// Simple debounce
delay(50);
}
I’ve checked the wires, everything is correct. Nothing is touching. It’s only when the ground is in the terminal, even if the 12v psu is unplugged the gnd shuts the uno down. My uno is powered via usb. Any help?
Hello everyone.
I just got a xiao mcu to use with a nrf24 as receiver. I spent the whole day trying to figure out how to set it up, to no avail.
So far, here is my code (below). I finally have SPI OK, after setting manually every pin. But I get Radio Fail and nRF FAIL as well. The wiring obviously is pristine and has been checked more times than I dare to say.
Any help or hint would be appreciated, thanks in advance !
Edit : Output is :
SPI OK
RADIO FAIL
nRF FAIL
DETAILS
SPI Speedz = 10 Mhz
STATUS = 0x00 RX_DR=0 TX_DS=0 TX_DF=0 RX_PIPE=0 TX_FULL=0
EN_RXADDR = 0x00
RF_CH = 0x00
RF_SETUP = 0x00
CONFIG = 0x00
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = Disabled
PA Power = PA_MIN
ARC = 0
===
#include <SPI.h>
#include <RF24.h>
#include <nRF24L01.h>
#define CE_PIN D6
#define CSN_PIN D5
#define SCK_PIN D8
#define MISO_PIN D9
#define MOSI_PIN D10
const byte thisSlaveAddress[6] = "00001";
RF24 radio(CE_PIN, CSN_PIN);
char dataReceived[12]; // this must match dataToSend in the TX
SPIClass spi(FSPI);
//===========
void setup()
{
pinMode(CE_PIN, OUTPUT);
pinMode(CSN_PIN, OUTPUT);
pinMode(MOSI_PIN, OUTPUT);
pinMode(SCK_PIN, OUTPUT);
pinMode(MISO_PIN, INPUT);
Serial.begin(9600);
delay(3000);
bool okspi = spi.begin(SCK_PIN, MISO_PIN, MOSI_PIN, CSN_PIN);
Serial.println(okspi ? "SPI OK" : "SPI FAIL");
bool ok = radio.begin(&spi);
Serial.println(ok ? "RADIO OK" : "RADIO FAIL");
bool okchip = radio.isChipConnected();
Serial.println(okchip ? "nRF OK" : "nRF FAIL");
radio.setPALevel(RF24_PA_MIN);
radio.setDataRate( RF24_1MBPS);
radio.openReadingPipe(1, thisSlaveAddress);
radio.startListening();
Serial.println("DETAILS");
radio.printDetails();
Serial.println("===");
}
//=============
void loop()
{
if (radio.available()) {
radio.read(&dataReceived, sizeof(dataReceived));
//Serial.println(dataReceived);
delay(1000);
}
}
I am working on creating u/edisonsciencecorner LED Hourglass project. In the original project there are two matrices which use a Nano and an ADXL335 accelerometer to illustrate the "grains" of sand falling as LED's. I created that project and it ran super smoothly. Shout out to Edison for sharing that code.
I'd like to modify the code to allow for a second set of matrices to be run from a different set of pins on the Nano/
I created an initial Wowki project that has the code and a rough idea of how the components are wired. Wowki Project. I had to use the MPU-6050 as a place holder as there was no ADXL335.
I was hoping to see if anybody had any ideas on how to modify the code for a second set of LED matrices. I am a super beginner so this might be out of the realm of possibility for me. Any help would be greatly appreciated!
Hello! So I received an error message when verifying code in the Arduino IDE that the header-file " Commands.h " can't be found. ...but IT IS LITERALLY HERE:
It's in THE SAME PLACE AS EVERYTHING ELSE! Why can my program easily find everything else ( like " Sony9PinRemote.h " ) but not this?!
Here is " Commands.h ", btw. Perhaps the problem lies in the code...
#include <Sony9PinRemote.h>
#ifdef SONY9PINREMOTE_DEBUGLOG_ENABLE
#include <DebugLogEnable.h>
#else
#include <DebugLogDisable.h>
#endif
Sony9PinRemote::Controller deck;
namespace command {
void ONE() {
deck.play();
}
void TWO() {
deck.stop();
}
void THREE() {
deck.shuttle_forward(10);
}
void FOUR() {
deck.shuttle_forward(10);
}
void FIVE() {
deck.shuttle_reverse(10);
}
}
Hello, I am in the process of building a arduino RC plane. I just bought an ESC for my motor (Roxxy 715 S-Bec).
My plan (for starters) is to control it using my arduino, and so far i've used the setup and code available here :
https://howtomechatronics.com/tutorials/arduino/arduino-brushless-motor-control-tutorial-esc-bldc/
My problem is setting up the ESC for its first time. The user manual states :
- Programmable RC system set servo travel for throttle / motor to 100% in both directions
- Move transmitter throttle stick to the motor OFF position
- Connect a fully charged flight battery (-> beeps tones etc should occur)
The full manual is available here.
I do not understand how, plugging the battery last, the ESC could possibly understand that the throttle is at max then min, given no power source is supplied.
Sorry if my question does not fit here, and thank you for answering !