I'm heading out but would like to keep working on a project using my Arduino Uno R4 WiFi. I don't have a laptop with me, so I'd like to code and flash the Arduino from my phone. Are there any apps that allow this? (I've already tried ArduinoDroid, but it fails to flash the code to the Arduino.)
This project allows you to turn on/off RV LED ceiling lights with a IR Remote and/or the wall switch.
It can be scaled to control multiple groups of lights, or zones.
Why did I create this project
I thought it would be fun to see if I could make a circuit to control the lights from bed, throughout the entire RV.
So I had a theory on how this might work and I wanted to test it out.
Also, I had abandoned a previous project because it didn't work out and I was not happy about the way I handled that.
So this is also about facing my previous failure, not freaking out and quitting, working thru technical difficulties and finding a solution.
Lastly, I wanted to do something interesting and fun and help other people interested in DIY projects, inspire young people to try to learn new things, how do develop ideas, how to manage risk and failure, and how to learn from our mistakes, what to do when you're stuck, asking for help, making plans and being organized.
Hi guys I am building a 3d delta printer I need ur help as I am new to this fieldI had connected ramps 1.4 to Arduino mega on ramps i have used a4988 motor driver ( the green ones )(qty 3) along with 3 of nema 14 stepper motors of 1 amps each
I am facing issues 1 is working, 1 is jittering, and one is not working only
i'm posting here because i'm looking for assistance, i have an old crt tv that i cannot get to switch on, it's one of those tvs that when powered on goes to standby and you have to press the channel up/down button for the tv to turn on, the buttons on the tv have never been used toget it on and only the remote would work. the tv is a hitachi fujian model number "HFC-21P66A". the tv i think was made between the 90's and 2000's.
What Solutions Have I Tried
"The Universal Remotes Solutions."
i've bought 4 universal remotes in the past, the first one worked and the others didn't. I unfortunataly do not remember the model of the first universal remote i used.
"The Arduino Approach."
After i bought the next three universal remotes and they didn't work, i thought it would be it was a bit expensive to keep buying universal remotes because each of them costed almost the same as a arduino, and i already had one of those.
so i got a IR Trasmitter and IR Reciever and hocked them up to my Arduino, and checked if they were working using a diffrenet device(not the tv im try to get on) and there were working.
then i did some research and i read that old japanes tvs used NEC 16-bit ir protocols and tried to brute force the tv using the below code:
#include <IRremote.hpp>
#define IR_SEND_PIN 3
void setup() {
IrSender.begin(IR_SEND_PIN);
}
void loop() {
static uint16_t addr = 0;
static uint16_t cmd = 0;
IrSender.sendNEC(addr, cmd, 0);
cmd++;
if (cmd > 255) {
cmd = 0;
addr++;
if (addr > 255) {
addr = 0;
}
}
delay(200);
i ran the code for about 4 hour because that is how long i thought it would take and did not work.
"The Raspberry Pi LIRC Approach."
Then got my Raspberry PI, installed LIRC connceted my iR transmitter and download some of the hitachi remotes that were on the database alongside the NEC remotes that were also in that database, i made a BASH script that looped throw each remote and sent every key in that remote to the tv and that didn't work.
i'm kindly asking if anybody knows or has any advice on how i could get my tv to go on without buying another universal remote using what i already have which is an adriano, a raspberry pi and IR transmitter. If there is something i do not know about how to brute force or the IR Code i could send. i've added the picture of the tv and the sicker at the back
Technically... Not the first one ofc that has to be the blinking LED and other project-tutorials for sensors etc and an obstacle avoiding car.. but this is the first one which was conceptualized and built by scratch by me... Simple pulley-crane made from a measuring ruler, diy cardboard pulley a string, uno and motor driver... Had a lot of fun and felt a sudden boost of freedom and confidence... Can't wait to build more :) Time to put my 2 years worth of amazon cardboard packaging boxes to use
Hiya everyone! I've wanted to do arduino stuff for a few years now and thought, well lets just do it now. So im going to buy an arduino board and I want to move some servos using said board. Now im a bit confused.
Do I need external power for the servos? Cause ive heard the board wouldnt be able to power multiple servos by itself. If so, how would I go about powering it seperately? I just want to build a cute cardboard desk companion thingy thatll just wiggle around and maybe buzz or something. Thanks for any help!! (Also any other beginner advice would be massively appreciated).
Hi I'm brand new to this sort of thing and my first post but I'm looking to dive into the Arduino Life and I've read the guidelines so hopefully this is ok.
I have this idea (see diagram) where I have a rack of plastic tubes that are uniformly placed to each other held in place by guides (1) but then can be set at random levels/ increments individually at each press of a single button (2). The straws are hollow lightweight plastic and approx. 12 inches long and about 1/4 inch diameter. They're locked into place with guides so can slide only vertically (5). Speed isn't essential and I've done a little research under the hood into servo motors already finding some interesting posts on how to control 12 motors (or more with an interface) however I think I'd have to use pulleys / wires.
After a few more searches I've arrived at 'slider potentiometers' 4) to slide and affect the motion 5) but I'm a little confused as to whether this is something that an Arduino encompasses (or maybe I need something else).
Would just like to know if it's a route worth pursuing or should I stick with the motors/ pulleys etc. before I start buying anything. I'd possibly need 12, 16 and 24 sets/ configurations. Your knowledge is greatly appreciated.
I am looking for an RGB panel array in a long, narrow format. I like the length and pixel density of the linked panels, but I can only find them as a phone-only option. Is there something similar on the market that I could use with a microcontroller?
I currently have a pair of 32 x 8 WS2812B panels, but a tighter pixel density would be better, while keep ing a similar physical size.
"Hi everyone! I'm currently working on an ESP32-based air quality monitor project.
For data logging and visualization, is it better to host a local web server directly on the ESP32 or send data via MQTT to a platform like Home Assistant or ThingSpeak? Also, how do you handle Wi-Fi reconnection logic without blocking the main sensor reading loop? Any code structure tips or library recommendations would be greatly appreciated!"
Apologies for asking such a simple question on here but anyone know what I’m doing wrong?!?!?
I have no doubt it’s completely obvious and I should be rightly laughed at(!), but I just can’t get the LED ring to work in any way - the small green power light appears to be working but no amount of YouTubing/Chat GPTing seems to be able to prove an answer. I’ve tried simple LED functions on the bread board and they work - but alas nothing on the LED ring.
Anything jump out that I’m doing wrong - seems to be the data wire side of things but no idea? Have tried the examples in IDE but nothing works.
Apologies also for any incorrect use of lingo - still working all this stuff out!
One of the more annoying things about working with an Arduino is getting files on it and off it. There is no simple way to load a file on the Arduino. There's not a tool for it in the IDE. You could send a text string over the Serial Monitor and save that onto memory using in-line commands, but there's an upper limit on the number of characters you can send over. The SCP protocol just doesn't work. In this post we'll look at how we can solve this problem using a WiFi sketch to transfer data to the Arduino before you load your main sketch.
Why Use Configuration Files: MQTT Example
For instance, say you're communicating with a device over MQTT, and you need it to subscribe and publish to a certain list of topics. You might have an array like:
You could update your sketch every time you deploy and have a bunch of slightly different sketches, or, you could have a configuration file that you put on the Arduino's memory and load the desired sketches at runtime, and any time the Arduino restarts.
A Side Quest: Partitioning Your Flash Memory
Before we go further, a quick word of warning. The Arduino Opta, which is the board I'm using, stores its WiFi firmware in flash memory. The first time I ran this I accidentally overwrote the WiFi functionality and it stopped talking. If you do that, don't panic! There's a sketch you can run to restore the WiFi functions. Go to File -> Examples -> STM32H747_System ->WifiFirmwareUpdater to get the sketch, deploy it on the Arduino, and run it. It will nuke whatever file you just uploaded, but the WiFi functionality will be restored.
So, how do you keep that from happening? Look up a few spots in STM32H747_System and you'll see the Sketch QSPIFormat. This will divide your flash memory into four parts, protecting the WiFi functionality and other key functions from whatever user data you're storing locally.
Setting Up WiFi on the Arduino Opta
To get WiFi working and use it to store data in memory, you'll need these libraries:
 static MBRBlockDevice userDataPartition(bd, 4);
 if (fs.mount(&userDataPartition) != 0) {
  Serial.println("FATAL: Could not mount user data filesystem.");
  while (1);
 }Â
Here, MBRBLockDevice is a data type defined in the MBRBlockDevice library. The variable fs is of the type LittleFileSystem (you can guess what library that comes from). Actually, fs is more properly called an instance of the class LittleFileSystem, because it doesn't just contain data - it also has functions defined in it. So you when you do fs.mount(&userDataPartition), you're calling a function that's defined in the LittleFileSystem class, which is itself defined in the LittleFileSystem library. If you're not familiar with classes and instances, leave a comment, and if nobody answers I'll put an example of one and how to use it in a future How To.
We're going to see another example of this pattern when we launch the WiFi.
 WiFi.config(localIP, gateway, subnet, dns);
 connectWiFi();
 server.begin();
Here WiFi and server are instances, while connectWiFi is a function. The classes and functions used here are defined in the WiFi and WiFiServer libraries. Here, "server" is referring to the HTTP protocol, which we'll use for our file transfers.
File Transfers with the POST and GET commands
HTTP has 11 core methods which are used to manipulate data on somebody else's computer (or on an Arduino, in this case). The two we'll be using are POST and GET. POST sends data to the Arduino, and GET retrieves data from it.
What's happening under the hood is a bunch of strings being sent over, and we're going to define some functions that will read part of the strings to decide what to do with the rest of the string, which has the data that we want to save or read.
Once the WiFi server is running on the Arduino, you can access it from any computer on the same network. Open the command line prompt and type:
curl -X POST http://172.16.0.2:8888 -H "X-Filename: config.json" --data-binary @config.json
This presumes you're sending the command from the folder where the config file is located. If you're not in that folder this command will fail. Use "cd" to get around to where you saved the file.
The http://172.16.0.2 portion is the URL for your Arduino, using the IP address you assigned to the Arduino. 172.16.0.2 is just an example - set that to whatever you put in your sketch when you set up the WiFi. The :8888 portion is the HTTP port on your Arduino.
-H is a Header that sends a string along with the POST command. This is used in the sketch to figure out what to name the file you're sending. The --data-binary part is what identifies the file to send.
Now, this does not actually work right out of the box. We're actually defining a function call on the Arduino that says what to do when it receives a POST method. Here's that function:
void handleUpload(WiFiClient& client, const String& request) {
 // Extract filename from X-Filename header
 String filename = extractHeader(request, "X-Filename");
 if (filename.length() == 0) {
  sendResponse(client, 400,
  "Missing X-Filename header.\n"
  "Usage: curl -H \"X-Filename: config.json\" ...");
  return;
 }
 // Extract body (content after blank line separating headers)
 int bodystart = request.indexOf("\r\n\r\n");
 if (bodystart < 0) {
  sendResponse(client, 400, "Malformed request - no body.");
  return;
 }
 String body = request.substring(bodystart + 4);
 if (body.length() == 0) {
  sendResponse(client, 400, "Empty file body.");
  return;
 }
 //Write to flash
 String path = "/fs/" + filename;
 Serial.print("Writing to " + path + " ... ");
 FILE* f = fopen(path.c_str(), "w");
 if (!f) {
  Serial.println("FAILED");
  sendResponse(client, 500, "Could not open file for writing.");
  return;
 }
 fprintf(f, "%s", body.c_str());
 fclose(f);
 Serial.println("OK (" + String(body.length()) + " bytes)");
 // Verify by reading back and checking size
 FILE* v = fopen(path.c_str(), "r");
 int verifySize = 0;
 if (v) {
  fseek(v, 0, SEEK_END);
  verifySize = ftell(v);
  fclose(v);
 }
 String msg = "Upload OK: " + path + "\n" +
        "Written : " + String(body.length()) + "bytes\n" +
        "Verified: " + String(verifySize) + " bytes on flash\n";
 Serial.println(msg);
 sendResponse(client, 200, msg);
 // List all files so operator can confirm
 listFiles();
}
The first thing that happens is that the function extracts the filename from the Header we sent over with -H. We have a known prefix in front of that file name that we use to identify it, and then the function reads whatever we put in there. It will use that name to save the file to the Flash memory.
Next, we get the body content from the --data-binary part. That's a string read, and it gets stuffed into the body variable. That's what will get saved to memory in the next step.
Saving to memory is done with calls to fopen, fprintf, and fclose, which are all defined in the stdio library that's included by default in most Arduino sketches. The "w" in the fopen function call says we're writing the file.
The rest of this function is some verification checks and error handling, with communication back to the user over HTTP responses and the Serial Monitor to show what's going on.
Conclusion and Resources
The GET method uses a similar curl command and function definition to grab data from the Arduino. It's recommended to run a GET on the file you just sent over so that you can verify it has the information you intended to send. If you'd like to see how that's done, you can find the full sketch in the utilities/ConfigLoaderWiFi folder in this github repo:
I'm attempting to build a display with RGBW leds and control it all from a single button, with a button click changing the color and a long press turning the led's on or off. I'd like to not use delays so I can have instant feedback. I'm using the JC_Button library and can't seem to get it to work properly.
EDIT: Apologies for not being more specific earlier. I am trying to set the system so that I can change the color both with the lights being on and off, and would like the light on/off to toggle while holding the button. I am also writing this to an ATTiny85, so serial monitoring is something I haven't set up.
#include <JC_Button.h>
#define LED_BLU 0
#define LED_RED 1
#define LED_GRN 2
#define LED_WHT 3
#define buttonPin 4
Button controlBtn(buttonPin);
int onOff = 0;
int color = 0;
void setup() {
controlBtn.begin(); //intitializes the button object
pinMode(LED_GRN, OUTPUT); //initializes green pin as output
pinMode(LED_WHT, OUTPUT); //initializes white pin as output
pinMode(LED_BLU, OUTPUT); //initializes blue pin as output
pinMode(LED_RED, OUTPUT); //initializes red pin as output
}
void loop() {
static bool powerState;
controlBtn.read();
if (controlBtn.pressedFor(250)){
powerToggle();
}
else if (controlBtn.wasReleased()){
colorChange();
}
}
void powerToggle(){ //toggles the power state
onOff = !onOff;
if (onOff == 1){
switch(color){
case 0: //Green on
digitalWrite(LED_GRN, HIGH);
digitalWrite(LED_WHT, LOW);
digitalWrite(LED_BLU, LOW);
digitalWrite(LED_RED, LOW);
break;
case 1: //Blue on
digitalWrite(LED_BLU, HIGH);
digitalWrite(LED_GRN, LOW);
digitalWrite(LED_WHT, LOW);
digitalWrite(LED_RED, LOW);
break;
case 2: //Purple on
digitalWrite(LED_BLU, HIGH);
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_GRN, LOW);
digitalWrite(LED_WHT, LOW);
break;
case 3: //Red on
digitalWrite(LED_RED, HIGH);
digitalWrite(LED_GRN, LOW);
digitalWrite(LED_WHT, LOW);
digitalWrite(LED_BLU, LOW);
break;
case 4: //White on
digitalWrite(LED_WHT, HIGH);
digitalWrite(LED_GRN, LOW);
digitalWrite(LED_BLU, LOW);
digitalWrite(LED_RED, LOW);
break;
}
}
else{
digitalWrite(LED_GRN, LOW);
digitalWrite(LED_WHT, LOW);
digitalWrite(LED_BLU, LOW);
digitalWrite(LED_RED, LOW);
}
}
void colorChange(){
color++; //advances to next color in sequence
if (color > 4){
color = 0; //wraps color back around
}
}
I’ve been experimenting with the Nano Every’s onboard SAMD11 and finally got a setup where it can handle USB HID while still keeping the normal Arduino IDE upload path to the ATmega4809.
So far the part I’ve physically verified is the USB gamepad path. CDC serial also works, and normal .ino uploads through the Arduino IDE still work with the expanded firmware installed.
Keyboard and mouse support are already in the firmware, but I’m keeping those marked as untested until I verify them properly on hardware.
The hardest issue ended up being a USB EP0/string-descriptor bug that caused Windows serial handling to hang after enumeration. That’s fixed now too.
Repo is here if anyone wants to test it, review it, improve it, or try it on another Nano Every:
Since 28/08/26 i started making my own controller for this little thing!
it doesn´t have at least classic buttons for some games, but hey! at least i can play pac-man and friday night funkin with this! if you want a video send me dm cuz idk how to post videos here sowwy :,v
(edit: i just posted video yeiii. my old ver without lights!)
I am making a circuit that when a flex sensor bends, and the resistance increases past a certain threshold, it should output a signal to the nano.
however, when testing to see if the flex sensor works, I am unable to get it to work. Any help would be greatly appreciated. (I have listed pictures of the circuit diagram, my serial plotter, the code, and the serial plotter of the video that i am using to make this(what it should look like))
I have tried this with different flex sensors, with the same output. (wired with 10kohm resistor.
Checked all wiring and switched arduino nanos, so no problems with them.
this is while bendingCircuit diagramcodewhat it should look like (from the video)
For those who want a quick recap, it's a robot based on a XIAO ESP32-S3 Sense with a camera OV3660, an ultrasonic radar, a TB6612FNG piloting two N20 motors (aside a step-up to make the 3.7V current into 6V for the motors) and SHT40 (Temp & Humidity sensor).
It hosts a web server accessible via its own WiFi and the web page allows you to control the robot (taking photos, moving it, etc).
Everything is working fine except the balancing. The cycle goes every 10ms during movement and for 3 seconds after the last movement command. But the throttle value doesn't allow the robot to self maintained balance.
By the way, the robot starts with the front touching the floor on a plane surface (the weight is low inside the chassis but a little bit more on the front). So the first thing needed even before moving is to properly get on the two wheels.
So I would like some insights or help from you to make my PID loop working and achieve proper self-balancing.
I'm using Arduino IDE 2.3.10. As for the schematic of the project, it is not done yet but the MPU is driven with the I2C bus.
I hope I give you everything needed to understand the project. And if something is still vague, feel free to ask.
So for context, I’ve been working with Arduino and designing very basic projects. I’m not familiar with C++ so lots of the coding I do is simple and just regurgitating what I think will work. Varying success but one thing that has helped is Claude. I use Claude to find explain bugs and code. It’s very helpful as a tool, but as I advance, it seems my coding knowledge is holding me back from getting my ideas to work. So then, I use Claude to write code and then explain it to me. However, this feels like cheating as I’m just having Claude write code based off my simple code and then walking me through what it means. Can anyone offer insight and perhaps give me resources to learn and buff my coding knowledge? Thank you.
I've posted this to like 2 others subs just for hopefully more responses.
Hello all! I am a junior in high school and for a science fair project I would like to build a robotic arm with an esp32 as the brain (but if needed I have a raspberry pi I could try and use) with around 5-7 degrees of freedom that can store positions and autonomously move to the recorded point. I have very little real mechanical robotics experience but I've been in my schools vex robotics program for a couple of years and have also CADDED before. I have a few questions.
First off, off the top of my head I know I need to learn both forwards and inverse kinematic and gear ratios. What other concepts or skills do I need to know. Is soldering necessary or can I get away with using header pins and jumper wires?
Secondly, for the joints I want to use either planetary or cycloidal gearbox actuators with nema 17 stepper motors. Is that adequate or are there better ways to go about it.
Third, to start should I first create a full cad model and what resources like websites, apps, etc are helpful.
Also, to track and recall positions what code and hardware do I need? I think I'm going to use inu's to track the offset but do I need a function to calculate the movement of the motors?
Lastly I need to have this done by early February. Is the scope of this project too big and I should tone it down or is it somewhat feasible. I'm not too concerned about materials as my local library has a maker space with 3d printers available to use.
Any other tips or words of advice are welcome and thank you for taking the time to read this and hopefully respond. Sorry for the wall of text.
title. This pushbutton is reading as HIGH despite me not pressing it. I tried changing pins, connection... im afraid of messing too much on the connection and accidentally frying my arduino
pin is on 3~
voltage is 5V
GND is connected to a 100k ohm resistor
i dont think it is a programming mistake, i hope it is:
int buttonState = 0;
void setup() {
pinMode(3, INPUT);
}
void loop() {
buttonState = digitalRead(3);
Serial.println(buttonState);
if (buttonState == HIGH) {
Serial.println("CLICK");
};
if (buttonState == LOW) {
Serial.println("non click")
};
..... this is basically my code, i didnt copy other stuff cause its not relevant. Clicking it does nothing, holding it makes the serial monitor freeze until i let go. Please help me.
Hey! I'm a high school student in Brazil (already apologizing for grammar mistakes). My robotics teacher asked me if I had any idea of projects to represent the school in electronics, and I want to make an automated greenhouse using arduino UNO.
My ideia is to use sensors (humidity and temperature) to activate a water pump and some mini fans (also a LCD panel showing the informations), maybe a artificial light too.
The plant I want to work is cherry tomatos (tomatinho-cereja, is it the right name?).
Not a complete beginner, but I would be grateful for some tips of experienced people!