I am somwhat new to p5 and arduino, so please forgive me if this is a stupid question. I am trying to get serial data from my Arduino Uno to a js file I have on vs code, but each time I select the correct COM that my Arduino is connected to, and click 'open' on p5.serialcontol, I get an error that says "Error on COM7: Couldn't open port: undefined - Closing port"
Does anyone know why this is or how I can fix it? I have included screenshots of my p5.serialcontrol, index, js, arduino.ino, and html console log.
For context, I'm a beginner in making stuff like these, this is kind of my first time, this is for a school project, so sorry for the messy placements
But I tried to use tinkercad for the simulation
And I ended up with this ( the circuit )
So I just need the servos to spin when the tilt sensor senses a tilt, but I have a different tilt sensor, the circuit uses an SW-200D, while I have an SW-520D, so there's already a difference in number of output pins ( I'm not sure if that's what it's called ), and I'm just not sure about everything else after that 😭😭
The code is quite confusing too, I don't know a single bit of coding, so I tried what I could with the limited knowledge I know
->
#include <Servo.h>
int oozmakappa = 0;
Servo servo_12;
Servo servo_11;
Servo servo_10;
Servo servo_9;
Servo servo_8;
unsigned long spinStartTime = 0;
unsigned long totalSpinDuration = 0;
bool isSpinningForward = false;
bool needsToReturn = false;
void setup() {
pinMode(13, INPUT);
servo_12.attach(12, 500, 2500);
servo_11.attach(11, 500, 2500);
servo_10.attach(10, 500, 2500);
servo_9.attach(9, 500, 2500);
servo_8.attach(8, 500, 2500);
servo_12.write(90);
servo_11.write(90);
servo_10.write(90);
servo_9.write(90);
servo_8.write(90);
}
void loop() {
oozmakappa = digitalRead(13);
if (oozmakappa == HIGH) {
if (!isSpinningForward) {
spinStartTime = millis();
isSpinningForward = true;
needsToReturn = true;
servo_12.write(180);
servo_11.write(180);
servo_10.write(180);
servo_9.write(180);
servo_8.write(180);
}
} else {
if (isSpinningForward) {
totalSpinDuration = millis() - spinStartTime;
isSpinningForward = false;
servo_12.write(0);
servo_11.write(0);
servo_10.write(0);
servo_9.write(0);
servo_8.write(0);
spinStartTime = millis();
}
if (needsToReturn) {
if (millis() - spinStartTime >= totalSpinDuration) {
servo_12.write(90);
servo_11.write(90);
servo_10.write(90);
servo_9.write(90);
servo_8.write(90);
needsToReturn = false;
}
}
}
delay(10);
}
On tinkercad, it stops after 1/2 a spin, and just doesn't move anymore?? 😭😭
I'm very confused, someone please help me and guide me on what to do
If anyone could be of guidance to me, please do so, I'm struggling on how this is supposed to work 💔 I tried looking through YouTube but strangely I just couldn't find anything 😢
So i want to build a small Projekt with a arduino. The problem is I dont know wich wires I should use and how I should wire it. It should be as compact as possible. I am complete beginner. It would be great if someone can help me :)
Problem: DC Dont Work idk why. All Connections Are Right. B+ and B- Give 12v But M- And M+ Dont Give 5V. All Pins Give Correct V to BTS7960B. I tried it with 3 driver(BTS) it gave same results.
I built this with an Arduino Uno, an HC-SR04 ultrasonic sensor and a buzzer. Moving my hand toward the sensor makes the beeps faster; moving it away slows them down.
I used Soldr, an electronics design agent I’m building, to design the project from a plain-language prompt.
The clip shows the working build. How do you usually smooth ultrasonic distance readings without making the response feel sluggish?
My husband has been talking about Arduinos for months now. As we approach the holidays, I really want to get him set up to start playing around. I see the starter kits he's been looking at online - so I was going to start there.
In my experience buying starter kits of any kind usually you have to get an additional few items to either get duplicates or fill it out. Is there any other items I should get him to build a nice starter pack that's a bit more then a basic kit? For reference - here is the kit he was looking at on Amazon-
I would like to ask for your advice regarding the development of our acoustic termite detection, pertaining to lower frequency vibrations.
We will use esp32 as our main component but are struggling on which sensor to use since structural vibrations are the usual sounds of the dataset we used instead of airborne so it is basically susceptible to noise and microphone. We considered using piezo transducer disk, but we're not sure how it will interact to the trained model since it is wav file based, and our datasets uses structural vibrations
Hi everyone! I recently picked up a Seeed Studio XIAO ESP32S3 Sense. I'm complete beginner when it comes to microcontrollers, but I'm eager to learn and good at following step-by-step guides. Could anyone recommend good beginner video tutorials, walkthroughs, or resources to help me get started? Also, if anyone in the Las Vegas area is familiar with these boards or willing to answer a few beginner questions, I’d really appreciate it!"
I'm developing a simple sketch to use to develop a audio program latter on for a new project. I've included the program and the wiring with an Arduino UNO. The amplifier is shown jut as text because I couldn't find the proper icon. It works but there is very low volume from the speaker no matter how high I turn the volume. I've tried different amps and speakers with the same results. Any help would be appreciated.