r/ArduinoHelp • • Dec 20 '24

Code compiles successfully in Windows but "Return code is not 0" in arduinodroid

2 Upvotes

I built a Palmtop phone case several months back using an Arduino Leonardo keyboard controller I bought and a salvaged Psion 5. With the help of a friend I managed to brute force the keyboard matrix and add several missing symbols with Fn keys and I was hoping to add a few more (I'm missing the hyphen key which has been pretty annoying), but with the USB connector entombed in hot glue I'd rather leave it in place and flash it from the phone itself (Redmi Note 11s).

It's almost like it isn't reading the PsionKeymapUSB.h file and ignoring all of the defined variables.

PS: I don't actually know how to code, or what I'm doing in general but I did successfully compile and upload this modified code before and have been daily driving this for several months.


r/ArduinoHelp • • Dec 09 '24

SPI Connection Problems between an Arduino Nano and an Arduino Nano BLE

2 Upvotes

Hello,

I'm currently working on a project which includes iestablishing an SPI connection between an Arduino Nano and an Arduino Nano BLE. Im using the Nano as master and the BLE as slave. I used the oscilloscope to determine whether they are even transitioning data, but only the chipselect changing is visible. I think the clock frequency is too high for my oscilloscope to detect. Anyways i think there is a problem in my code, which prevents the data transition from one board to the other. I would be glad if someone could help me out, because my knowledge isn't yet deep enough. Thank you in advance.

Master Code Nano:

#include <SPI.h>

const byte SLAVE_SELECT = 10;

void setup() {

pinMode(SLAVE_SELECT, OUTPUT);
digitalWrite(SLAVE_SELECT, HIGH);

SPI.begin();
SPI.setClockDivider(SPI_CLOCK_DIV128);
SPI.setDataMode(SPI_MODE0);
SPI.setBitOrder(MSBFIRST);
Serial.begin(9600);
Serial.println("Master gestartet");
}

void loop() {
byte dataToSend = 0xAB;

digitalWrite(SLAVE_SELECT, LOW);
delay(100);

byte response = SPI.transfer(dataToSend);

digitalWrite(SLAVE_SELECT, HIGH);

Serial.print("Gesendete Zahl: ");
Serial.println(dataToSend);
Serial.print("Empfangene Antwort: ");
Serial.println(response);

delay(100);
}

Slave Code Nano BLE:
#include <SPI.h>

const byte SLAVE_SELECT = 10;

void setup() {

pinMode(SLAVE_SELECT, OUTPUT);
digitalWrite(SLAVE_SELECT, HIGH);

SPI.begin();
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));

Serial.begin(9600);
Serial.println("Master gestartet");
}

void loop() {
byte dataToSend = 0xAB;

digitalWrite(SLAVE_SELECT, LOW);
delay(100);

byte response = SPI.transfer(dataToSend);

digitalWrite(SLAVE_SELECT, HIGH);

Serial.print("Gesendete Zahl: ");
Serial.println(dataToSend);
Serial.print("Empfangene Antwort: ");
Serial.println(response);

delay(100);
}


r/ArduinoHelp • • Dec 01 '24

Stuck at this point

2 Upvotes

Imagine this as sequential shifter,

i have add to push buttons as shift up and shift down.

9 Leds has added. first one for neutral and other 8 as gears.

everthing works well,

if im at 6th gear and wants to shift to neutral or 1st gear, i need to press shift down button again and again, its to hard. so now i want to add two more push buttons ,

one for neutral led

one for first gear

then when i press one of them, quickly it will shift to neutral or first gear

can someone tell me how to add those two new buttons to work like this,,

code is below

int FWGear = 3; //foward button

int BWGear = 4; //backward button

//variables

int GearCount = 0;

int FWGearNew;

int FWGearOld = 1;

int BWGearNew;

int BWGearOld = 1;

// led pins

int NLed = 7;

int G1Led = 8;

int G2Led = 9;

int G3Led = 10;

int G4Led = 11;

int G5Led = 12;

int G6Led = 14;

int G7Led = 15;

int G8Led = 16;

void setup ()

{

pinMode(FWGear, INPUT_PULLUP); //foward button

pinMode(BWGear, INPUT_PULLUP); //backward button

pinMode(NLed, OUTPUT);

pinMode(G1Led, OUTPUT);

pinMode(G2Led, OUTPUT);

pinMode(G3Led, OUTPUT);

pinMode(G4Led, OUTPUT);

pinMode(G5Led, OUTPUT);

pinMode(G6Led, OUTPUT);

pinMode(G7Led, OUTPUT);

pinMode(G8Led, OUTPUT);

}

void loop ()

{

FWbutton();

BWbutton();

Neutral();

First();

Second();

Third();

Forth();

Fifth();

Sisth();

Seventh();

Eighth();

}

// Foward Gear Button Count

void FWbutton()

{

FWGearNew=digitalRead(FWGear);

delay(100);

if(FWGearOld==1 && FWGearNew==0 && GearCount <8)

{

GearCount = GearCount += 1;

}

FWGearOld=FWGearNew;

}

// Backward Gear Button Count

void BWbutton()

{

BWGearNew=digitalRead(BWGear);

delay(100);

if(BWGearOld==1 && BWGearNew==0 && GearCount >0)

{

GearCount = GearCount -= 1;

}

BWGearOld=BWGearNew;

}

// Led Funtions Based On Button Count

void Neutral()

{

if(GearCount==0)

{

digitalWrite(NLed, HIGH);

}

else

{

digitalWrite(NLed, LOW);

}

}

void First()

{

if(GearCount==1)

{

digitalWrite(G1Led, HIGH);

}

else

{

digitalWrite(G1Led, LOW);

}

}

void Second()

{

if(GearCount==2)

{

digitalWrite(G2Led, HIGH);

}

else

{

digitalWrite(G2Led, LOW);

}

}

void Third()

{

if(GearCount==3)

{

digitalWrite(G3Led, HIGH);

}

else

{

digitalWrite(G3Led, LOW);

}

}

void Forth()

{

if(GearCount==4)

{

digitalWrite(G4Led, HIGH);

}

else

{

digitalWrite(G4Led, LOW);

}

}

void Fifth()

{

if(GearCount==5)

{

digitalWrite(G5Led, HIGH);

}

else

{

digitalWrite(G5Led, LOW);

}

}

void Sisth()

{

if(GearCount==6)

{

digitalWrite(G6Led, HIGH);

}

else

{

digitalWrite(G6Led, LOW);

}

}

void Seventh()

{

if(GearCount==7)

{

digitalWrite(G7Led, HIGH);

}

else

{

digitalWrite(G7Led, LOW);

}

}

void Eighth()

{

if(GearCount==8)

{

digitalWrite(G8Led, HIGH);

}

else

{

digitalWrite(G8Led, LOW);

}

}


r/ArduinoHelp • • Nov 22 '24

Is this possible

Post image
2 Upvotes

I’m making a science fair project where I need to measure the output of some different solar panels over some time. I just want to measure the output of amp and volts at different times of the day, but I want nothing to do with the charge it generates, i just want it to kinda go away. Would it be fine as a closed circuit like how it’s set up or should I throw in a LED or something to consume the charge as it’s being created in without impacting the volts or amps. i can elaborate further if needed, cuz this probably sounds confusing as hell.


r/ArduinoHelp • • Nov 15 '24

Voice activated lamp using arduino and bluetooth

Post image
2 Upvotes

So, we got this mini project to make, it's an voice activated lamp using arduino and bluetooth. I have encountered a problem, whenever I plug in the lightbulb to the power source it always lights up instantly when it actually need a voice command to light up. What can seems to be the problem?


r/ArduinoHelp • • Nov 14 '24

CreateProcess error when uploading ESP32 IoT Cloud code from Arduino IDE

2 Upvotes

Hi everyone,

I'm encountering an issue when trying to upload a sketch to my ESP32 board via Arduino IDE(2.3.3). Here’s the error that keeps coming up:

xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory 
xtensa-esp32s3-elf-g++: error: CreateProcess: No such file or directory

exit status 1

Compilation error: exit status 1

Here’s some context to clarify the situation:

  1. Other sketches upload perfectly through both Arduino IDE and Arduino IoT Cloud.

  2. This error only occurs when I try to upload a code from Arduino IDE that connects to Arduino IoT Cloud.

  3. I’m using Arduino IDE specifically because Arduino IoT Cloud doesn’t support the FastLED library, which I need for this project.

Here’s the code I’m trying to upload (credentials omitted for privacy):

#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
#include <WiFi.h>

// WiFi credentials
const char SSID[] = "wifi_ssid";
const char PASS[] = "wifi_password";

// Arduino IoT Cloud credentials
const char DEVICE_ID[] = "device_id";

// Cloud variable
String effetti;

// LED pin configuration
const int LED_PIN = 2; // Built-in LED on ESP32
void onEffettiChange() {
    Serial.print("The 'effetti' variable has changed. New value: ");
    Serial.println(effetti);
}
void setup() {
    Serial.begin(115200);
    // LED setup
    pinMode(LED_PIN, OUTPUT);
    digitalWrite(LED_PIN, LOW);

    // Connect to Wi-Fi
    WiFi.begin(SSID, PASS);
    while (WiFi.status() != WL_CONNECTED) {
        delay(1000);
        Serial.println("Connecting to WiFi...");
    }
    Serial.println("Connected to WiFi!");

    // Configure Arduino IoT Cloud connection
    ArduinoCloud.setThingId(DEVICE_ID);
    ArduinoCloud.addProperty(effetti, READWRITE, ON_CHANGE, onEffettiChange);
    WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
    ArduinoCloud.begin(ArduinoIoTPreferredConnection);
}
void loop() {
    // Maintain connection to the Cloud
    ArduinoCloud.update();

    // Check Cloud connection status
    if (ArduinoCloud.connected()) {
        digitalWrite(LED_PIN, HIGH); // Turn on LED when connected
    } else {
        digitalWrite(LED_PIN, LOW); // Turn off LED if disconnected
    }
}

Any advice on troubleshooting this error would be greatly appreciated. Thanks!


r/ArduinoHelp • • Nov 14 '24

Solar tracker?

2 Upvotes

Hi everyone, all the tutorials/products online seem out of date. I'm trying to make a little device that tracks the sun's position in real time - it shines little light or laser where the sun is supposed to be.

I need help with all the parts, even the laser/light. Any ideas are appreciated, thanks!


r/ArduinoHelp • • Nov 12 '24

ESP8266 NODEMCU ERROR

Thumbnail
gallery
2 Upvotes

I tried changing drivers, updating, reinstalling, corrct port, install esp board manager Still doesn't work My computer shows it as USB-SERIAL CH340(com6) Please help🙏🙏


r/ArduinoHelp • • Nov 03 '24

Why a 4G shield is so expensive compared to a 4G USB Modem?

2 Upvotes

I was looking for 4G shields and I found a lot of them, all over $30.00... and then I remembered from my childhood, when we needed to use internet outside home we had an USB modem. We stick that on the notebook and we were ready to use the internet.

So I did a really superficial research and I found some USB 4G modem for $10.00 or less... This make think.

Is this really a 4G LTE working dongle? And, if yes, why the hell are we paying 30 bucks on a shield where we still need to implement everything under the hood?

And finally, how are you Guys handling remote network access?


r/ArduinoHelp • • Oct 30 '24

US supplier of Arduino components and electronics

2 Upvotes

Hey everyone,

Delete if not allowed of course. We are new supplier of Arduino/maker parts and components. Our goal is to supply the community with near AliExpress prices but faster delivery and better customer service/support. We've helped customers adjust their code for better functionality and diagnosed issues.

There are a lot of amazing experts in this community and we'd love feedback on the website, technical specification error fixes, and opportunities to curate an inventory that is inline with the communities needs. We typically add 10-15 new parts a month and always looking for suggestions on what to add next.

We also recently started an affiliate program to offer commissions to community members that help spread the word while creating content on their platforms. We'd also be open to help getting product designs off the ground, specifically SBCs and smaller breakout boards for specific components.

We are huge supporters of open source and involvement. We hope you check out our website www.wildware.net and even if you don't purchase anything drop us a suggestion.

Thank you everyone for making this what it is so far and look forward to helping you all with your projects.


r/ArduinoHelp • • Oct 17 '24

Density based Traffic lights

2 Upvotes

Can you guys help me create a diagram for 2 way traffic lights with 4 IR Sensors


r/ArduinoHelp • • Oct 14 '24

Simon says 3x3

2 Upvotes

Hello, right now I am coding an Arduino Simon says program for school but doesn't work and wanted to ask now if someone has a program or some advice for it. We are using 9 LEDs and 9 buttons for the 3x3 field and an LCD display for the round counter and if you lose. Also a Red Led If you lose. The LCD isnt working and the Game it self doenst really work any Problem in the program maybe? It also includes Levels. Thanks for help and advices.

include <Wire.h>

include <LiquidCrystal_I2C.h>

// Initialisiere das LCD-Display mit der I2C-Adresse 0x27 (kann je nach Display unterschiedlich sein) LiquidCrystal_I2C lcd(0x27, 16, 2);

const int ledPins[9] = {2, 3, 4, 5, 6, 7, 8, 9, 10}; const int buttonPins[9] = {A0, A1, A2, A3, A4, A5, A6, A7, A8}; const int redLedPin = 13;

int sequence[5]; int userSequence[5]; int level = 0;

void setup() { lcd.uttonPins[i], INPUT_PULLUP); } pinMode(redLedPin, OUTPUT);

randomSeed(analogRead(0)); generateSequence(); }begin(); lcd.backlight(); lcd.print("Simon Says");

for (int i = 0; i < 9; i++) { pinMode(ledPins[i], OUTPUT); pinMode(b

void loop() { playSequence(); getUserInput(); checkSequence(); }

void generateSequence() { for (int i = 0; i < 5; i++) { sequence[i] = random(0, 9); } }

void playSequence() { for (int i = 0; i < 5; i++) { digitalWrite(ledPins[sequence[i]], HIGH); delay(500); digitalWrite(ledPins[sequence[i]], LOW); delay(500); } }

void getUserInput() { for (int i = 0; i < 5; i++) { bool buttonPressed = false; while (!buttonPressed) { for (int j = 0; j < 9; j++) { if (digitalRead(buttonPins[j]) == LOW) { userSequence[i] = j; buttonPressed = true; while (digitalRead(buttonPins[j]) == LOW); // Warten bis der Taster losgelassen wird } } } } }

void checkSequence() { bool correct = true; for (int i = 0; i < 5; i++) { if (userSequence[i] != sequence[i]) { correct = false; break; } }

if (correct) { lcd.clear(); lcd.print("Win!"); } else { lcd.clear(); lcd.print("Verlierer"); digitalWrite(redLedPin, HIGH); delay(1000); digitalWrite(redLedPin, LOW); } delay(2000); lcd.clear(); generateSequence(); }


r/ArduinoHelp • • Oct 10 '24

Hi guys, this Is my first post, and I really need help with my physics proyect

Thumbnail
gallery
2 Upvotes

(I'm using Google translate because I'm not very good with english) I'm making a project for my physics class. It's a tank which has a movable turret that works with Arduino, as a firing method I'm using parts of an automatic hydrogel gun. When the ultrasonic sensor detects something the gun should fire but when it does in practice it doesn't work. I'm still quite a novice in the Arduino area, although I find it something amazing, this is my second project and I would like to do more in the future. The blue battery Is form the gun

The code Is here: https://drive.google.com/file/d/1l7ySIFyJXcR5RHBync3Ps7ufaUmirIbB/view?usp=drive_link


r/ArduinoHelp • • Oct 08 '24

Trying to connect Arduino Nano RP2040 connect to WIFI

2 Upvotes

Hi Community,

Q1) I have a specific library that i have trained from Edge Impulse and the code runs smoothly on the device. What I want to do is to make the device portable by attaching to a power bank. So what is the additional coding that i have to do to get the WIFININA library working.

Q2) I need to create a dashboard for the out put that i get. I saw someone else has done it but i need few more clarifications on the steps (Smart Jacket for Fall Detection: A Human Activity Recognition (HAR) Application for Healthcare | Arduino Project Hub. )

Please help me with this team,

Thank you


r/ArduinoHelp • • Oct 04 '24

Touch wore to servo issue

2 Upvotes

Hi all, Could anyone point put any glaringistake please. Innhonesty I used chat gpt to give me a code to control 2 servos simultaneously via contact wires , I'm using bare copper wire for each contact switch and although there are some movements they are not responsive nor predictable. Any help would be greatly appreciated. Thanks

include <Servo.h>

include <CapacitiveSensor.h>

// Create CapacitiveSensor objects for both touch wires CapacitiveSensor capSensor1 = CapacitiveSensor(2, 4); CapacitiveSensor capSensor2 = CapacitiveSensor(6, 8);

Servo servo1; Servo servo2;

int threshold = 5; // Lower threshold for sensitivity bool lastTouch1 = false; bool lastTouch2 = false; unsigned long debounceTime = 10; unsigned long lastTouchTime1 = 0; unsigned long lastTouchTime2 = 0;

int pos1 = 0; // Store current position of servo 1 int pos2 = 0; // Store current position of servo 2

void setup() { Serial.begin(9600);

// Attach servos to their respective pins servo1.attach(9); servo2.attach(10);

// Move both servos to the initial position (0 degrees) servo1.write(0); servo2.write(0); }

void loop() { long sensorValue1 = capSensor1.capacitiveSensor(30); // Read first touch wire long sensorValue2 = capSensor2.capacitiveSensor(30); // Read second touch wire

Serial.print("Touch 1: "); Serial.print(sensorValue1); Serial.print("\tTouch 2: "); Serial.println(sensorValue2);

bool isTouched1 = sensorValue1 > threshold; bool isTouched2 = sensorValue2 > threshold;

// Check for touch wire 1 if (isTouched1 && !lastTouch1 && (millis() - lastTouchTime1 > debounceTime)) { if (pos1 == 0) { pos1 = 90; // Move to 90 degrees if it's at 0 } else { pos1 = 0; // Move back to 0 degrees } servo1.write(pos1); // Update servo 1 position lastTouchTime1 = millis(); }

// Check for touch wire 2 if (isTouched2 && !lastTouch2 && (millis() - lastTouchTime2 > debounceTime)) { if (pos2 == 0) { pos2 = 180; // Move to 180 degrees if it's at 0 } else { pos2 = 0; // Move back to 0 degrees } servo2.write(pos2); // Update servo 2 position lastTouchTime2 = millis(); }

// Update the last touch state lastTouch1 = isTouched1; lastTouch2 = isTouched2;

delay(10); // Small delay for stability }


r/ArduinoHelp • • Sep 30 '24

Can't get motor to spin

Post image
2 Upvotes

I'm brand new to the game here. I have a project in mind that I want to build but am basically just doing each task one at a time. I'll then compile everything into one project. Part one of this is getting a motor to run for two minutes when a button is pushed, and then shut off. I believe my code is correct here. But my motor does not spin after the button is pressed.


r/ArduinoHelp • • Sep 25 '24

Long-Range RFID Reader for Goat Tagging Project – Any Suggestions?

2 Upvotes

Hey everyone!

We're currently working on a project involving goats and are using an Arduino Uno with the MFRC522 RFID reader. The problem is, the MFRC522 has a very short range and requires the tag to be almost in contact with the reader, which isn't practical for our setup.

We're in need of an RFID reader that can scan from a longer distance. Has anyone used a better alternative that might fit this scenario? Any recommendations would be greatly appreciated!


r/ArduinoHelp • • Sep 16 '24

Who likes building Cuberpunk projects? Anyone have any sourcing resources to help?

Thumbnail
gallery
2 Upvotes

I want to build something like this. Any advice?


r/ArduinoHelp • • Sep 03 '24

How can I learn circuit design extensively?

2 Upvotes

Hello I started doing arduino projects with a starter kit, and once I’m done with all 14 projects, I want to learn circuit design. I just finished learning about pull down resistors but not from the kit, but from reddit because the kit used it but didn’t talk or explained it. I want to know the best design practices, so I don’t fry up my arduino units and have reliable circuit designs.

Are there any good online courses (preferably cheap or free?)


r/ArduinoHelp • • Aug 30 '24

Why won’t the IDE show suggestions for auto complete?

2 Upvotes

I’m not new to programming, so the programming side of things for arduino come pretty smoothly for me, but one thing chokes me up: the IDE won’t suggest any auto complete, it’s like using on of those really bad code editors that provide no value tbh


r/ArduinoHelp • • Aug 07 '24

Comprehensive Tutorial about using 3.5 inch TFT LCD shields with Arduino UNO R3/R4 or Mega

2 Upvotes

Hope everyone's doing well. Here is a multi-part comprehensive tutorial I have created on using 3.5 inch TFT LCD shields (sometimes called 3.5 inch MCUFRIEND shields) with an Arduino UNO R3/R4 or Mega.

A few months ago, when I bought the display and decided to mess with it, I realized that the existing tutorials were either hard to follow, not detailed or not comprehensive enough for me to be able to build complex applications with it. They would cover the basics, but it was hard to build projects where the display would be a single component along with several other components. Finally, none of them showed how to use the display with the Arduino UNO R4 Minima/WiFi, which is what Arduino recommends for most people moving forward.

This tutorial aims to provide a complete guide with end-to-end coverage of the topic. The full tutorial is divided into 6 parts, and it covers the following -

  1. Setting up the software libraries to use the display.

  2. Architecture of programs that use displays and graphics, along with good and bad patterns.

  3. Calibrating the touchscreen (an explanation of the calibration process, the program as well as a video demonstration of the process).

  4. Using the builtin SD Card slot to load and store images, separate from the Arduino's internal storage.

  5. Using text-files with the SD Card in creative ways, such as storing configuration data, logging etc.

  6. Building a paint app (including a canvas, color-selector and stroke selector), as well as Tic-Tac-Toe (including a starting menu and ending screens).

It includes high quality images, diagrams and video demonstrations where required and divides each task and topic into easy-to-follow steps.

I would appreciate everyone's feedback and comments on this series, as well as ways to make it better. Here are some pictures from the projects given in the series -

The code for all these are available on Github as well (links are in the website, but I am open to sharing it here as well).


r/ArduinoHelp • • Jul 25 '24

Using Arduino IDE and ESP32 Board

2 Upvotes

I've been using UNO exclusively but just got the ESP32. Is it just a matter of selecting the ESP32 board from the IDE and then including any other libraries I need for a successful sketch? Tks Ron


r/ArduinoHelp • • Jul 25 '24

Arduino on Linux help

2 Upvotes

How to use Arduino in Linux? I m using fedora 39, hyprland, and my laptop can't detect the port sometimes and if it does it doesn't work.


r/ArduinoHelp • • Jun 06 '24

Learning arduino code for beginners

2 Upvotes

So basically I want to be able to make what I want and code for it but every tutorial says to copy the code already there which means I don’t really understand what I’m doing. Is there any good courses etc preferably free for learning to code arduino properly. I know some c++ but there is still a learning curve. I don’t mind paying!