996 Replies
@star Code
This is your test code STAR
My code
@Maderdash @star
So, I'll keep my answers here cause I'm grumpy and want to go to bed.
And I'll answer you since you look like someone interested in solving your problem and others peoples also.
I know this chip from a long time
yayyy
thanks @AARAVmakes
lol
L298N PDF
Part #: L298N. Description: DUAL FULL-BRIDGE DRIVER. File Size: 185.1 Kbytes. Manufacturer: STMicroelectronics.
first just look how old and simple this chip is
second, does your board looks exactly like this?

Mine is EXACTALY like that
Please pay attention to the jumpers, where it says "12V jumper" and "enable A" and "enable B"
But my problem is that I don’t have common GND
I removed the jumper cuz I’m powering from 5v
thats no problem, you first need to understand what you have in your hands
both of our boards are the same shield variant
even the jumpers and eveything?
great then

I’m not home anymore
okay, so I hope you see some similarities between your board and the datasheet circuit:

Its everything there, those diodes, resistors, capacitors... just look at your board.
now for the misterious pins on the left side
they are all externalized to those blue screw connectors on your board
you must use all of them in order for the circuit to work
otherwise the image above wont be the same
so, here is the 1 million dollar question:
what have you connected to those blue screw heads?
to my esp32


right, but exactly what goes where, you can write over the picture I dont care its ok

it only takes a minute and saves you and all of us hours of debugging...
uhhh
hold on
I wait.... everything for science students
I’m wondering how do I get common GND between my computer USB port and my power bank
through the USB cable, but its another topic, cause many are insulated, so I can tell you another time
Ena goes to d14
in1 goes to d27
in2 to d26

I stripped mine
You can see it here were it connects to the 5v port

first port to red wire battery
second port gnd + battery wire

user aarav, we WILLfigure out these l298n boards
weong rely
K
🤣
@alexsbmagalhaes


haha yes yes of course, so, now you know that your enable is at d14 on ESP32 right?
what are you telling d14 to do in your program?
just paste your program here also use
alrrrr
paste it without formating I dont care, I format it for you
The programs are on the top for both of us
2 hours left
haha omg
its ok
omggg
was there anything wrong with my wiring or my codinggg
wait you are trying to control it with bluetooth? 😄
thats a lot to fix in a small time, lets first focus on the motor spining.
..yeah it says so in the code
a lot how?
my problem was it was connected, but the motors didn't run
okay, lets test it with a very simple program, ok?
I understand.
Try this simple code, and tell me if your motor run, ok?
alrrr
Star do you have common GND?
// Motor A pins
int motor1Pin1 = 27;
int motor1Pin2 = 26;
int enable1Pin = 14;
// Motor B pins
int motor2Pin1 = 25;
int motor2Pin2 = 33;
int enable2Pin = 32;
// PWM properties
const int freq = 30000;
const int pwmChannelA = 0;
const int pwmChannelB = 1;
const int resolution = 8;
int dutyCycle = 200; // 0–255 (speed control)
void setup() {
Serial.begin(115200);
// Motor pins
pinMode(motor1Pin1, OUTPUT);
pinMode(motor1Pin2, OUTPUT);
pinMode(motor2Pin1, OUTPUT);
pinMode(motor2Pin2, OUTPUT);
// Configure PWM channels
ledcSetup(pwmChannelA, freq, resolution);
ledcAttachPin(enable1Pin, pwmChannelA);
ledcSetup(pwmChannelB, freq, resolution);
ledcAttachPin(enable2Pin, pwmChannelB);
}
void loop() {
digitalWrite(motor1Pin1, HIGH);
digitalWrite(motor1Pin2, LOW);
digitalWrite(motor2Pin1, HIGH);
digitalWrite(motor2Pin2, LOW);
ledcWrite(pwmChannelA, dutyCycle);
ledcWrite(pwmChannelB, dutyCycle);
}
if you meant I connected gnd to gn then eys
just try this code, and tell me what happens
remember, backup your old code (I have done a backup for you too), create a new code, and replace everything with the code I sent you.
Will this code work for me too? (With the correct pins)
yes sure
I'm stressing so much
this is nothing more than initializing the pins, seting up pwm, and then runing it
also is it possible, motor for one and then servo the other
I know mate... just try the code and tell me the results
we can adjust later
👍 👍 👍 👍 👍 👍
The code won’t work cuz I don’t have common GND right?
lol it cant work properly without common GND
its maybe the fifht time we answered you this 😅
in case no one has mentioned it, all the things in a system need a common ground 😉
Ik but I was wondering how do I get coming GND
oh shieee*t anon is here, things got serious
😂 🤣
bro
picture this, your MCU is sending control signals to the motor driver
and say it sends a HIGH
anon we missed you
its simple like that:
you pick a friggin jumper wire, you chose the color, there are many in arduino sets, you stick to anyplace named GND on one board, and take the other end and stick to wherever its also named GND on your other board
HIGH = what voltage?
by the way @star have you tested the code I sent you mate
it still conpiling
jts so slkw
im gonna die
My power sources are an power bank and laptop
my groupmates would think I really ditched out on them
it shouldnt be this slow... I told you to get a fresh program and just paste the code I sent you
it isss a new window
mybe the bruken spel czecher is slowing it down
RIP
Anon I dont even get to that question yet
nvm it is under the same file
i do not betray
sorry assembly team
omg haha
just asking, for how long do you guys have this task?
I’m not involved with star, we just had the same problem at the same time 🤣
I mean how long has it been that you guys been assigned this
I know @AARAVmakes
this is under esp32 right?
... last week
its not doing blinky blinky blue light
nor are the motors running
Same problems im having
the blinky blinky is the bluetooth probably
(im not home rn)

The blinking LED is an part of the code me and madersash made
oh you using ESP32.... thats why it takes long time compiling
nvm
it takes me 15ish seconds with esp32 with 200+lines of code
so, send a picture of your board now
...
you prolly skimmed the code LOL
I'm supposed to connect to dabble
yes I took out necessary things for you for a moment because they arent necessary for the tests
so now we know its not about other software

and I need you to look exactly at the pins on your esp32
TIP: black magic marker will tone down the power LED
here you go, shere I connected where and where


you mean the jumper on the l298n right
on the esp
he probably has a lot of peripherals selected when created a new project
ohhh, do I remove it
on the ESP
just noticed you have your finger on it
Also I apprecoate help guys but I dont have that much time left
😞😞 I need a quick help straigjt to the pointt
yeah, lights were blurring pin names
dont remove anything, we need to be sure where it goes
Help star ⭐️
This is mine if you have time to help me

that was clever!
Ohhhh, you removed the magic marker above
was that it?
@AnonEngineering the magic marker

if you put marker on the LED is won't glare - thats all
@star I think I see the problem
olz tell me now ily
Or you could just plug out power to the espresso machine…
guys these riddles are driving me crazy
but do I remove it
no, forget it, move on 🙂
*ESP, my autocorrect sucks
yes lets keep moving
oh I thiught it might be a hindrance
whats the problemmmm
ahhhh
two hours
star, in your code, you use two motors, and you only have one conected to the input pins, connect them both
haha chill
take a deep breath theres more
the other motor broke btw, that's why I unplugged the other three
I forgot to edit that out
what you mean by broke?
do we know the 3.3v logic drives the L298?
:uno:
last night I was going ballistic two hours of sleep cuz the copper connector snapped
Yup
so I went ant opened it myself only to find out what I just did makes it not completelt work anymore
so after the test run today, I'm going to connect it to a servo motor instead
and the orher a dc motor
but right now I need to connect at least just one through dabble
its ok we got you
I froze for a moment but yes
it does work
I hope sooooo
All my ports are connected, dabble recognizes my bluetooth, but why wont the motors work? first I found out l298n isnt open, then I cant find another problem

so lets get the connections straight:
// Motor A pins
int motor1Pin1 = 27;
int motor1Pin2 = 26;
int enable1Pin = 14;
lets see your ESP

they are correct

thanks for the pic
now for the logic 5V. Remember your ESP works on 3.3V. What is powering your ESP?
i believ with the jumper there you are putting 5v on pin 14
is he using the jumper?
🤷♂️ it's in the pic...
wdym what is powering??
Uhh, rn its on bcs of my computer but Imm gonna use powerbank
star do you have a jumper here? if you do remove it.

ena1 -14 yes
u guys told me to put it on eaelier💔💔
alright
my fav tweezers are gone and I loved those tweezers
I wasnt here earlier
just focus man
my tweezers 😭😭😭 ill try
my motor board turned off
what I meant for "how do you power the ESP32" is:
are you connected via USB to your laptop?
dont worry, we'll get to the jumper later
how do you power your ESP32?
With battery?
or
With USB cable?
I can see you are powering it with USB cable
how are you powering your L298 board?
I dont see power cables from your batteries to your board
I’m back home 🤓 can you help me now or are Yall gonna help star first?
you trying to drive an L298 with an ESP32 as well?
Yeah 👍
I hope @star didnt give up... we were really close
I was facing the same problems as her
powerbank
yeah, I figured that out in your absense
my friend said this
"That should be battery+, battery-, and ESP32 5V pin"
I can say confidently that you have correct connections.
I’m powering motor driver with my power bank and the esp from my 💻
the program I wrote you tries to run both motors constantly. Can you please make sure you have both GND's connected? I tell you how bellow:
You should be promoted to helper or knowledgeable
another one said my 5v pin said isnt connected to anything
L298 Vmot pin is spec'ed for 7v minimum...
yes, and he has a power bank for it
a 7v power bank?
12V
wow
then I would take 5v out and power esp32 Vin from that
just by one glance huh
can you give me a vosual aid
@star Mate, please, be careful to this:
disconnect your USB cable from the PC
whoops
whyyy
we will power your ESP differently
ok ☺️☺️☺️☺️☺️🥰

I understand this should be a movable bluetooth thing right? so there shouldnt be any cables there
This is my ESP32/ motor driver

@star did you get the motors to move?
you are missing common ground
How do I get common GND?
connect L298 gnd to ESP gnd
i mean where I find 5v to connect
Ok
look at terminal on the right - that is a 5v output
@star Anon just sent you a great picture of where you should connect your ESP32 5V pin to.
OHHH
sorry ai slept 4 am in the morning
so you mean
ofc that only works if you have a common ground - in case that hasn't been mentioned lately 😉
esp32 connect to
but you should never connect both your USB cable and your ESP 5V pin to your motor board at the same time
the 5v, both 5vs connect to each other
gnd is alr connected
@AnonEngineering like this?

what the heck.. how will I input code no
so I'm worried for you to forget that and accidentaly plug it in your computer...
well... it should work in theory
so long as that is ground yes - now your control signals have a reference to "push against"
but its not a good idea, current will flow in non intended ways, right, @AnonEngineering
alsoooo
a really skilled friend of mine said to put jumpers back on en 1 and 2
This won’t fry my computer or turn my powerbank into an bomb right ? Cuz it feels like it
please just stick with us... if you start trying everything everyone tells you, we wont get far
I dont even have cutter rn can I just not expose jt like rhis

alrighttt
you always need common ground

welp
With common GND can I test my code now?
no 5v
ESP32 has 3.3v
yepp
Not usually 5v
@star just make a quick test. unplug from PC, plug the 5V pin to your 5V header on your motorboard.
5v POWER, 3.3v LOGIC
Anon, do I remove the power jumper?
on the L298? no
K
I’m supplying it 5v 1 amp
WAIT
you supply L298 12v IN, take 5v OUT
alrighttt
tho prolly 3.3v cuz theres no 5v in esp32
there is a 5V pin on every esp
oh no
show me your ESP32 board real quick

I’m suplming the motor driver with 5v 1 amp OR 5v2amp from my power bank
it is labeled Vin in your board

oh
ok ily
unplug from your PC
then connect there
your ESP should power up
and hopefuly your motors too
its not plugged to anyth rn thats why its not lighting

I should prolly expose?
is your motor board powered up?
no
plug the 12V jumper again
it has to work
okayy
above right
so both boards are powered up?

only one
I bet your GND is loose
can you check that for me?
I crammed two wires w it so it probably is
just remove the GND wire on your ESP and plug it on another GND on your ESP
alr it isnt
tugged a bit
just try it as I said
pick an easy one to find
im gonna cry

im gonna need to expose them but its gonna take a while
friend, that is not how a breadboard works 🙂
the L298 needs 7v minimum
you csn just plug the dupoint like that?
Mine has an 5v terminal though

you can but its not connected to the GND in that way
ughh
that is an output
so much work
I'll tell you where to plug it hang on
Okie
So u have been shorting my powerbank the whole time?
But the power LED did turn on
yes mate it is.
Also, sadly you only have those two GNDs...
Do you have a multimeter?
yeah
alr
omg to buy cutter
I have an multimeter
Because if your ESP32 isnt powering up, its a pretty clear sign that theres not a common ground there
@AnonEngineering when I connected 5v the power led did turn on
no, that input powers the L298 logic - not the motors
K
So how many AA batteries would I need? I have no 18650
6 (9v)
Or can I use an 9v cell to test
not really - no current
K
can you carefully place the wire back to the original GND and please measure between your dupont and your header to look for 5V ?
The motor needs no current - I can power it with an 1v solar panel. An red LED needs two of those panels
*it’s exaggerated but the solar panel part is true
motors always need current - they need power, power = volts * amps
K
@star are you still with me?
The motor is on rn, that’s how little current it needs

little vibrator motors, ok
It’s surprising
So my point is can I use an 9v battery to quickly check?
6AAs would be messy
Or is 5v 1amp from the powerbank enough
@star this is getting really late for me. I'm sorry we couldnt find you a solution in time (maybe ask us before you get to the death corridor lol)
@AnonEngineering It takes about 0.6v the motor

@star If you must, please just undo what we did, its easy:
Remove again the 5V wire from your ESP and motor board.
Plug again your board to the computer.
Leave the 12V jumper in.
(NOOO I bricked my computer again…. I can’t code now)
I brought a cutter
im going to expose all the dupoints
That was quick
@star also, we tested everything but your motors. If you just want a quick test to know if they are spining, connect one directly to your 12V batery. It must spin. Then undo this, remove the wire from your 14 pin on your ESP and connect a jumper on motor A ENA like this:

you are really trying arent you
You could have used scissors
i get that a lot
from other embedders
ok I'll just expose this gnd one
and then I'll follow your insteuctions
since Ive cut the dupoint now and theres no going back haha
I hate duponts. You know what really works and never fails? Ethernet cables jumpers. Just strip some old LAN cable from your router or whatever, cut the ends, and bang, milions of jumpers.
aybe its because I dont have my favorite tweezers but this is so stupid 😭😭😭 eectronics arent real and must be accessed through magic why isnt it on

alrightt
Can someone help me? Cuz to un-brick my laptop I would have to remove the battery and put it back in. I don’t want to that if no one wants to help me @alexsbmagalhaes @AnonEngineering
connect one directly to my 12v battery?
And smoke. if you let the precious smoke escape, things stop working 😉
also I'm using 3.3v rn
so I really need those tweezers?
I'm not sure what you meant
alright

I put the jumpers back on
so I wire my battery over there
no no wait
oh okay
I froze for a second
its correct
thing is, the way you wired things, as soon as you power up your ESP your motor will spin
alrighttt
hold on
life is so hard without my tweezers
you are powering the L298 with a powerbank?
dude I'm so sorry I didnt see your message
wtf just happened there lol
no that was for AARAV
5v regulator must be turned on
yeah I meant him too
right?
I'm just sleeping awake
yes
Yeah but I’m unbrickimg my laptop rn, anon I was asking if I can power the motor with an 9v battery via the driver for testing, it uses 0.7v

alright
wtf man lol
if I remove the wire on my 14 pin, where do I connect it
ok, idk why the laptop bricked...
anyway, try powering the L298 with a 9v battery, it should last a few minutes
this is so genius
If I enter my password wrong once, it becomes bricked the only way to fix is my removing the battery
nowhere. when you use the jumper on ENAA or ENAB this will connect your motor to max speed all times
whattt
so ena is plugged??? But like theres not even one source to connect ena??
I got an shock😭

for full speed = put jumper, to control speed = remove jumper
@star @AARAVmakes yes
did you guys get it?
Yeah
alright I'll trust u guys

I’m 13 and the fact my dad trusts me to take apart valuable electronics is crazy though
with no jumper green must go to HIGH
can we js do op 2 instead this is driving me balls

guys its a very very simple task if you look:
Connect your L298 pins to your ESP32
Connect both GNDs
Connect power to ESP
Connect power to motors
high is vin right
no, HIGH (from thje L298s point of view) is 5v, just put the jumper back
Guys I'm really really tired its almost midnight here. I'm sorry we couldnt fix this earlier. I'm pretty sure your motors will spin.
but isnt 5v -> vin
Can you help them Anon?
i don't like that diagram
me too 😭 been getting mixed signals with the instructions
yeah, i'll hang for awhile, only 10:30PM here
or maybe cuz one hour sleep
same here
alright
summarize everythinf @AnonEngineering
I hope @Maderdash is having fun with my struggle lol I was just looking to chat and here I am 2 hours later
I would ask you guys to the voice chat, its easier than type, but im too tired
so goodnight everyone!
I’m confuzzled
Good night @alexsbmagalhaes
ok, let's summarize
L298 Vs pin wants 7v to 46v
Nooooo my computers still bricked

*the 2 hours does nothing
Vs

Im still so confused Im sorry

GND is ground, everything in the project has to have grounds connected
alrigjt
can I just use normal dupoints
Vss is a 5v OUTPUT
no exposing wires
ohh
no vss tho
use Vss to power the esp
so 12v powers L298, L298 powers ESP
alrightt
simple, one battery
@AnonEngineering can I also for example, remove 5v regulator , put the jumpers back on en1 and 2
leave 5v jumper on, put EN jumpers back on
K
I lost one more jumper
if you remove 5v jumper then Vss becomes a 5v INPUT (which you don't want to do)
Anon these are the battery holders I have how do I wire them in series

Is it just + to -
Or do the different sizes chabge anything
pick ONE black wire, that will be your ground
the red from that holder goes to black on the next, then that red to black on the next, then the red left over is 9v
I FOUND THE THIRD JUMPER
so 9v or 12v, you'll both have a good Vs to go with
do you have a multimeter?
Yeh
ok, once that is all wired you should see 9v between Vs and ground
AND 5v between Vss and ground
K
Is the 5v jumper connected to Esp32?
5v enable jumper on L298
so your 9v in is regulated down to 5v which coming out of Vss will go to Vin on ESP
aame inputs for me and him right
but let's measure BEFORE you even connect ESP
star is using 12v, AARAV is using 9v, but for our purposes everything is the same
you have a multimeter @star ?
if you do, same thing
ok, once that is all wired you should see 9v between Vs and ground
[10:48 PM]
AND 5v between Vss and ground
yeahh
Erm what the sigma

Why 7
(It’s mixed normal and rechargeable)
rechargeable what? NiMH?
I dont follow @AnonEngineering
can we do a call
i can't do audio
shucks
I really need that rn cuz it seems faster
Yeah NiMh
and I have one more hour left
you have 12v connected to Vs and ground?
I dont know whta you mean by 12v, I dont have thst
With all non-rechargeable it’s still 7v
they are only 1.2v, not 1.5v
mor the vs and ground
7v is good enougj
all I know is gnd must be gnd
K
also by 12v do gou mean powerbank or battery
can we pleaseeee all do a call or you really cant?
so put black multimeter lead on gnd, red on Vs, what do you read in DC volts mode?

close to 500 @AnonEngineering
you have a 12v battery right?

no, 3.3v
huh?

and you are reading Vss, not Vs
oh
that's 11.1v, close enough to 12v
it said 3.7v
ohh
well
so where do I connect that battery, can you encircle

each cell is 3.7v, 3 in series is 3.7 x 3

between 12v and ground
red to Vs, black to ground
ohhh, so not next to each other
alr Thats what I did
@AnonEngineering can I test my code now?
12v = Vs
and put gnd wire on gnd
yes
wait a sec, lets do this one step at a time
I have like 5 more mins for the day
so, both of you, what do you measure between 12v (Vs) and ground?
wdym
I gtg
if you gtg, go ahaed and test, maybe you'll get lucky 😉
How do I power the 5v pin?
from Vss (5v) on the L298
👌
So what do I do?
I’m confused
i know 🙂
hopefully everything is powered now
and so if the code is good your motors should be spinning
Can I externally power the espresso?
you are (I thought...0
From an powerbank, bridging the GND
your batteries are powering the whole thing
I would prefer not… if it’s possible to externally power it I would do tha
batteries ARE external power...
if your power bank is 5v that won't do the job
Battery’s power the driver and power bank power Esp32 is that possible
I have no real progress im so scatterbrained right now
at all
yes, if you want, just make sure the grounds are connected (and NOT Vss)
measure between 12v and ground, what does it read?
alright i out my 12v batteries to the ground input
the 12v battery has a plus and a minus, plus to 12v, minus to ground
So I connect the battery GND to esp 32 GND right?

it isnt , nor is it related to my track
its for a competition, I had a plan out how things should run, but didnt really dissected which one goes to where
then this is Electronics 10000.5 🙂
alright I'm going to do a face time call, you dont have to talk @AnonEngineering
I'm just really desperate getting things fone
it's real simple - hold the battery plus wire - connect to 12v on L298
hold battery minus wire - connect to ground on L298
wait thats what I did
LETS GO!!!!! MY MOTOR SPINS !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
good for u😠😠😠
ok, now measure the voltage
I used external power bank power with 7v from AA batteries
I can share my wiring if you need
can you hop in general @AnonEngineering
you don't have to talk just chat
alrih but im using esp32
Same
i'll try, not too good at tyhese modern things 🙂
where'd ya go?
This Mumbo Jumbo is my wiring

so the big thing is the L298 is powered properly, and with the ground your control signals actually control the L298
(and by "powered properly" I mean "only good enough, barely" 🙂 )
The motor moves extremely slowly
But I guess that’s an task for another day 😂 🤣
@star please keep it in a channel, I don't do DMs
@AnonEngineering

i don't see a call at all
lemme see if i can unmute them
K
@Maderdash probably knows how to un mute them
Tbf this thread got 600 texts in 2 ish hours
And they did most of them
hope so, it won't let me 🙁
@Community Moderator 🧑⚖️ we need your help
I am one (I thought 🙂 )
(Ik)
@Maderdash plz
I feel bad for them
The luck I had that mine worked some how
not luck, you hooked up enough batteries
I also got lucky in the fact that those batteries are ages old, (we use NiMh) and they were charged
the big chip (bolted to heatsink) is the actual L298
it needs 5v for logic (and more for motors)
when you connected 5v the chip only got 3v and so wouldn't work
I though you were helper not mod…
both according to my profile
:arduinocommunity:
but I ran unmute and the bot said I need to be a mod to run the command 🤷♂️
So an doffent mod needs to run the command?
idk, i just asked in my fellow wizards channel
⏱ Timeout removed from
gay_mpreg
@star you back?
@star you back?
unmute told me I didn't have permission
hope it helps 😉
yuppppp
my baddd
alrigjt
can we call tho
@star it's real simple - hold the battery plus wire - connect to 12v on L298
hold battery minus wire - connect to ground on L298
lemme know when that is done
aaaghhh
which one is plus and minus...

can we just call
GND is -
aaaghhhh
sorry guys
red is plus
And 5v/12v is -
i slept 4 am in the morning and woke up at 5 , insteucttions are so grogy
ALWAYS REMEMBER THAT: 𝐫𝐞𝐝 𝐢𝐬 +/𝐯𝐜𝐜. 𝐁𝐥𝐚𝐜𝐤 𝐢𝐬 -/𝐆𝐍𝐃
can you? @AARAVmakes
anon will just type it out, I'll show a video
No i gotta sleep i got school tomtoew

NOO PLZ WAIT
plus wire, guess what black is?
alrigjt so this red one I attach another wire to vcc
Red is usually vcc
black to gnd
Yeah
what - don't make it hard
guysss can u look at the call u dont have to talk
K
it's real simple - hold the battery plus wire - connect to 12v on L298
hold battery minus wire - connect to ground on L298
I just need to see if im doing it right
general 1
Ignore the green wire

just red from battery to 12v on L298
just black from battery to gnd on L298
I gtg
shucks
don't worry about anything else yet
just red and black from battery
black doesn't look like its going to ground
middle is ground
i see white
ok, as long as black goes to middle
now take your meter
set to 20VDC
black lead to middle, red lead to left (ok, 50VDC)
it should read 10, 11, 12 volts, smth like that
show the dial again
that looks right
if black is touching ground, and red is touching 12v it should read
disconnect battery, read it directly with meter
DO NOT allow battery leads to tiuch each other
BLACK is ground, RED is plus
but if it doesn't read on your meter then the meter might be broken
take out one cell, put the leads across the cell, wht do you see?
how do I type in General?
just trying to make a simple battery voltage measurment
it''s set to 50VDC
not it was on DC
it was there
on 10V scale it should peg
measure each cell
it is certainly ONE problem 🙂
i think they are 18650s
And @AnonEngineering and the other mind person Thank You for the help!
@star any luck?
nope, trying to do simple things
so all are 9.6v - but is that pack is parallel, so no good
Maybe try an smaller motor first?
no, their "12v battery is 3v
you need a series battey holder
i didn't even know they made parallel packs 😉
😂
Well my circuit just turns what ever I hook up into an vibration motor
the "L293 driver shield" has servo connectors
not L298
no problem, thanks!
/*
*/
int motorone=23;
int motortwo=22;
int potpinone=4;
int potpintwo=18;
int ledone=2;
int DELAYone=200;
void setup() {
pinMode(motorone,OUTPUT);
pinMode(motortwo,OUTPUT);
pinMode(potpinone,INPUT);
pinMode(potpintwo,INPUT);
pinMode (ledone,OUTPUT);
Serial.begin(115200);
}
void loop() {
digitalWrite(ledone,HIGH);
delay(DELAYone);
digitalWrite(ledone,LOW);
digitalWrite(motorone,HIGH);
digitalWrite(motortwo,LOW);
Serial.println("Motor on full speed");
}
Is my code the problem, the vibration motor thing
i don't like the names, thats for sure 😉
@star

that is a series pack
@Maderdash can you type in a voice channel?
Ohhh , is my code wrong?
I still can't quite figure out Teams at work 🙂
so the whole General thing is a mystery
👍 I thought I had it, but it yelled at me
ok, I should be on about 9PM and up (Eastern)
if i'm on earlier i'm goofing off at work
ok, yeah I'll jump outta chat, the voices bug the wife
not yours, a suggestion for AARAV
@Maderdash google says a 3.2v can be sufficient enough but yeah, voltage goes dowb
Thank youu, I don't need a recode, just a tweak
btw
only one motor (the right side) will work, I included the left when it still was okay
yupp, my motorboard
thankss hold on
1 unfortunately
what do I do now
this half assed project and limited materials...
and my groupmates doubting my capabilities
I really have no hope
step 1 of any project is to figure out how to power it
its due tommorow now and theyre waiting for me to code it and we should meet up today
It powered on now so I have no idea why cant we just get straight to the point
man
you need 7v +
you have 3.2v
just 'cuz the LED comes on doesn't mean it's powered properly
I cant find that in less than a dag
3.2 can still run but itll be weak
I don't mind a weak powered motor as long as its working and functioning
durability is what we should be going for
i sympathize - but the Laws of Physics don't care
so jts not gonna run either way??
I dont mind a drop by 2 voltages💔
if you hook that battery pack to the L298, what do you read on the 12v pins - 3v?
what do you read on the 5v pins?
Use AA batteryis like I did, just take wires to each
Cuz Desperate Times Call For Desperate measures
SOOO CLOSE


how many?
does it have to come with a holder too
Or you could just screw the motor driver and use bare MOSFETS
No
take wires.. wdym?? Would it run an l298n @AnonEngineering @Maderdash
Yeah
mosfets??
That's what I did @star
Can I see
I used 6 AA batteries

cells in parallel - voltage stays the same, current adds up
cells in series - current stays the same, voltage adds up

I made this goofy ahh drawing earlier
With goofy spelling
@AnonEngineering cant they use bare MOSFET or rig together an AA battery pack?
I donr have a mosfet module
okay
aaa batteries it is
yes, but we're having a hard time getting voltage readings on the battery , you have to have a foundation before adding a roof to a building
bigger motor = more power
more power = more current
the 18650's have plenty of current, but in parallel they don't have enough voltage
I hooked up an bigger one now 😂
That was just to test
(I have smaller ones too)
and running the L298 at 5v is outta spec, so all bets are off
If they have time to find/buy one, an MOSET might be worth it or an battery pack might be worth it
these nattery holders are reverse polarized

my capacitator blew up
five should do right?

Send pic
if I use these instead

Each AA is 1.5v, 9v is prime, so about 6 is good
gosh I sont have a sixthhh
And, no 18650 ans AA combined. That's an recipe for an bomb
the one where it runs four holders is missing
Tape an wire to the AA BATTERY terminals
It's possible to add an 6th kne
you MIGHT get away with 4.5v (3 cells), it's better than 3v
too bad the 18650's don't fit in those holders
AAAAHH

HOW ABOUT THESE
perfect, it'll give you 9v at decent current
can three celled 9v lithium also do??
i think only AA's fit that holder, no?
No
each lithium cell is 3.7v
These are the same size as AAs

But they are rare

AA sized LiPos?
Yeah
It's 14500 Li-Ion 600 milliamp capacity
anyway, @star do you have 6 AA's?
for your consideration https://wokwi.com/projects/431438279543033857
Again, thx yall for your help!
I think she's cooked ...
not if she has 6 AAs...
She said she did earlier and I mean who dosent
If she somehow does not tell her to check in her TV remote toys etc
And bye I actually gtg now

now my motor board isnt powering on
it powered under lipo....
was my wiring correct earlier? is it truly batteries that were just the problem?
my wiring is correct definitely
do what we did before, measure the battery pack all by itself
can I just measure the whole thing in the holder already
sure, red to 12v, black to ground
should read somewhere around 9v

its not as high as the lipo had....
one or more of those cells may be dead
its brand new
😭😭😭😭
do I gen have no hope?
is the switch on?

OHH

IT HAS A SWITCH
whoops
WAAAAH

I LOVE YOU ALL OF YOUU
does it make the motors spin now?
Not yett, haven't ran dabbler yet
give me a sample codeee
dabbler?
and - do you read 5v between ground and the 5v pin on L298?
not that it matters in this case, you just need ground between L298 and ESP
thats what Im trying to do have you seen my code??
hold onp
@AnonEngineering
any sample test drives?
ur right, lets test without controllers first
try this code, very simple https://wokwi.com/projects/443496925947829249
if both motors spin, in both directions - your hardware is fine
btw asked for belp from other coders just in case smth is wrong or going on w my coding
they said it looked ugly LOL the format and brackets are messy
🤷♂️ I've seen worse 😉
but yes pressing CTRL + T in Arduino will format the code
@AnonEngineering
that may or may not work, does it compile OK for you?
yuppp
if it compiles then ig it'll work, never played with dabble myself
can I test motors instead?
that code should run your motors - if they are wired like your dabble code says
ohhh alrrr
btwww, a regular laptop could input commands through an ios charger right in an esp32
I was wondering if that was also the problem aside from batteries
input commands through an ios charger ???
yeahh
my computer recognizes that port
also its tupe c
your PC needs to "see" the esp32 if that is what you are asking
@AnonEngineering
does the esp show up in Device Manager under Ports?
when I uploaded a test code with lipo I feel like it registered my code better it was blue and blinky
i don't understand what you are saying, does the code upload to the esp32?
unless you have a wiring error the battery should make no difference to the upload
yeahh
I wondered if its the battery, but maybe its because I changed the wiring again earlier
yeah it does upload?
Im not sure if my esp32 registered it but my motors arent moving
look in Device Manager, under Ports

no, Windows Device Manager
could it be my old wiring was much more accurate


here's the new one

jumpers for ena1 and 2 are on rn @AnonEngineering
ok, then you can skip pins 25 & 27
idk if it really is an ios my
mom
said its an priginal and shes an appler

wait fr?
how would new wiring be then
acc lets call
just 4 pins, IN1 - IN4
and what is under Ports?

and it's 2AM here, i gtg, work in a few hours
you need to "see"the ESP32 there before you can upload
if that USB cable is charge only it won't work
oh nooo
no esp32 in here
here is an ESP bord I have laying about

so, until you see the board and know it's COM port you can't load new code
try to find a different USB cable
now I gtg
welp
I dont have that in my computer but I have that in ide
ok I downloaded ittt
This reminds me of a song:
Goodbye everybody... I got to go... Gotta leave it all behind and face the truth 🎶
@alexsbmagalhaes thx for the help!! And I got my display working
Now run the x64 installer (for newer computers)
what's up now, loading drivers?
@AnonEngineering to turn my motor from an vibration motor into an real motor, do I need to hook up more power?
if you have that mess of batteries giving you 7v you can probably connect a bigger motor.
motors need power. Power = Volts * Amps, so if you keep the voltage the same a more powerful motor needs more current.
With a big motor or a small motor, the motor just vibrates. The shaft does not move
sounds like not enough current for the motor then
if you "kick start" the motor by spinning the shaft by hand does it run?
I’ll try in an few minutes
ok, as for me, gtg, time for work 😭
K
Btw I solved the problem, it was just dead batteries
int motorone = 27;
int motortwo = 26;
int enable = 14;
int ledone = 2;
int DELAYone = 200;
void setup() {
pinMode(motorone, OUTPUT);
pinMode(motortwo, OUTPUT);
pinMode(enable, OUTPUT);
pinMode(ledone, OUTPUT);
Serial.begin(115200);
digitalWrite(motorone, HIGH);
digitalWrite(enable, HIGH);
digitalWrite(motortwo, LOW);
}
void loop() {
digitalWrite(ledone, HIGH);
delay(DELAYone);
digitalWrite(ledone, LOW);
delay(DELAYone);
Serial.println("Motor on full speed");
}
//This is your test code STAR
okay, fixed the wiring, used maderdash's code, compiled it, esp32 blinks blue, still no moving wheel
also debugged , checked every battery and saw continuity if its beeping from servo to pin
voltage meter has it all the way maxxed (50)
@AnonEngineering
yep, still haven't finished it LOL
all it does is blink blue
Anon I have another question, the motor still spins without commonGND
@star what are you powering it with?
And can you send an pic of everything you did so far
nvm I figured out his test code mostly blinked lights cuz led commands
how about you?
my phone is time limited
Same
LOLL we're using pc now right
I’m on phone 📞 rn
I hsve 3 mins left for the day
And I have downtime in the night
(My discord is unlimited bcz of unrelated reasons)
Well this is my setup and it works

Do you have AA batteries ?
works on motors? Same code?
Yeah the code is basically the same
huhhh
why wont it runnn
I made the OG code and then maderdash and anon modified it
hold on I'll pic w laptop
K
It’s prob not working bcz your power source is not good enough
yeah, I was wondering if their modified one elaborated on lights more
really? Hold on
@AARAVmakes

here @AARAVmakes
Did you check each individual battery to see it they are above 1.4v each?
yuppp
voltaged together they max the box
The only thing I can think of is that the motors require more current then the batteries can provide
So if it’s possible, hook up the smallest motor you have to the motor driver and de-attach the big cat motors to test my theory
I gtg to school now im already 2 ish hours late cuz i was feeling sick
huuhhh
these motors are the small ones you attach on rc cars
they're 6v
and I ran it under the battery series
ughhh where do I find such batteries
Ik
my battery series is strong enough right🥹
Your suppling the motor driver 8v, there is an 3v voltage drop, snd there are 2 motors . Each motor gets 2.5v
Maybe… but prob not
It’s on the line for one motor
ohh, what if I remove wiring for the other motor, so voltage won't be divided
it's not working anyway
but it can drive along the working one
Remove the other motor temporarily
And now try the code
didnt connect it , just wired the other ports
And when you do try the code lift up the car. So the motor has no strain
Tell me what happens when you remove one motor, and then lift up the car, and then try the code
Btw Anon is at work
ohhh
ughhh
the screw is stuckkk
There are a lot other helpers in the server
alr got it out
still.. nothing
@AARAVmakes

That’s what I said… each motor gets around 2.5v
also, I don't have any jumper on en2
I hope that's alright
You need jumpers
(If there are jumpers, then it’s HIGH/LOW only . If the jumpers are removed, then you need an PWM signals
OHHHH
I DONT HAVE AN EN2 JUMPER
HAHAHAHA
if I remove my 5v for my en2 @AARAVmakes what 5v external power will I get it from?
Idk I’m an begginer too
uhh
alrightt
@AnonEngineering
so I just realized most of it was cuz my wiring was wrong
and jumpers
but I can't seem to find the third one for en2
still wont runn
Run the code here https://discord.com/channels/420594746990526466/1422377417946693673/1422456904000606323
Use the pin numbers as shown at the top of the code
Back to work for me...
okayy
can I still function without a third pin for en2
That jumper makes it run full speed if it is attached. If it isn't there you connect the wire to the EN B pin
en b pin?
a;lrightt
is that 3.3v @AnonEngineering
that's all you have coming from an ESP, 3.3v
thank youuu
have you gotten a motor to spin yet?
not yettt
if you are using my test code make sure you are wired to the right pins
hold on
can you send your code again
@AnonEngineering can we have some sort of medal when we reach 1000 messages?
Just to celebrate this patience achievement
just kiding
@AARAVmakes have you guys fixed it yet ? @star what did your teacher say about your project?
haven't finished anything yet..
I made mine work
@AnonEngineering I know you're busy, but I genuinely cannot test your test code
if you haven't sent it yet
@alexsbmagalhaes any @AARAVmakes ideas?
I have no idea why his wiring is vastly different from the usual I've seen
but it's worth a try
I'm so doomed actually it's been DAYS. SINCE I ACC GOT IT TO WORKK
@AARAVmakes helppp
smashing my keyboard in pain and agony
deadline extended to none other than today
Idk anything
do u know what his test code is, has he given it to you
I made the test code and Anon modified it for your use case I think
alright
is that it? most of what he mentioned isn't in the code
Anyways, shouldn’t your teacher be teaching you ts
he hasnt taught anything similar to this
its a competition, I got one motorboard to work already but it exploded, the l289n is driving me nuts
alr I did it, changed wiring ince again @AnonEngineering
@AARAVmakes can I see your wiring?
I just have no idea

\why is mine only limited to blinking lights
like blue blinking lightd
zoom in for your motorboard and your esp32
Im not home rn

I found this idk how accurate it is
Scroll up 17 hours, my test code link is there
BTW we are past 1000 messages
On mobile, can't get it to paste, be online in a few minutes
Hey @star I cant be up late tonight. What you have there is very very simple. If you followed our instructions and it still didnt work, it may be possible your L298 is faulty...
If we keep this very simple and direct I can help you.
1 - can your motors run if connected directly to battery?
2 - you have only one good motor anyways, should you bother keep going with this idea? (I'm not discouraging you, I'm asking for an alternative)
This is your test code STAR
I'm pretty sure it's wiring at this point
^Maderdash made this yesterday
I mean, but we can't teach people what is a red wire what is a black wire. The lil dude was clearly exhausted yesterday, as much as I want them to accomplish their tasks, its not healthy to do it on the last seccond. Maybe a good lesson would be a bad grade on this discipline.
https://wokwi.com/projects/443496925947829249 the pin names should make it obvious what gets wired to what
It’s an competition and she has teammates so rhat might not be possible AND parents would cook her alive
yeah, motors can run directly under battery
also idk if there's any other better alternatives
did you get it so you can upload code?
I didn't do it last second, I got it working on an l293d but when it exploded, everything changed last minute
I did this, it was just blinking but motor didnt run
I should show you guys so you can tell me if smth is wrong
you must run the wires from EN A, IN1, IN2 to the right pins on the esp32
even en a? I remove the jumper
to make life easier, put the jumper back
I wont be long here, so if you guys think it can help: the L293 can also drive the L298... so if she already had it working with L293 it maybe can be easier if she has a spare one. (or make everything even more complicated, its your call)
for the 298 at this point we only need 2 wires...
yes nvm
@star look at this code https://discordapp.com/channels/420594746990526466/1422377417946693673/1422712475018727527
ignore the LEDs, they just standing for the L298 pins
@AnonEngineering @alexsbmagalhaes

I followed this

but idk whhat to do with my missing en2 jumper
I just connect it, to 3.3v right
did you do this for them? man thats so nice! what a lovely site too
don't worry about the jumper
if you are truly wired that way download the code here (I just changed it to match your wiring) https://wokwi.com/projects/443496925947829249
thank you
also thank you @alexsbmagalhaes @AARAVmakes for your patienceee
are you guys familiar with blynk iot?
get an LED to blink before worrying about Blynk
alright, but I'm wondering if I should switch from dabble to blynk instead, since you guys are familiarized with the app enough to help me if I'm doing smth wrong
you need to walk before you run, concentrate on just getting it to spin at all first
Yes, @star , pay attention to what Anon just said. Just focus on your main goal wich is: making the motor run. Thats all for the moment.
I can almost feel the anxiety through the screen
yeah, I'm doing the lights rn.. might take a while.. Wiring here confuses me a bit
you got this, its just some wires
Lights? all you need now are these 3 wires
L298 pin = ESP pin
its not blinking @AnonEngineering @AnonEngineering
whats not blinking?

removed motor b commands and used only three to save some tine
so motor a
well, the LEDs appear to not be connected
but that code is meant to drive your L298

ohhh, did I get that side of breadboard wromg
the LEDs are not needed, they just show you tghe status of the signals you send to an L298
ohhh
hold on
I switched to a diff breabdoard
so I'll connect it w l289 again
1289n*
just connect those 3 wires, plus ground
AHHHH
I GOT IT
ITS MOVING
I LOVE YOU
@AnonEngineering @alexsbmagalhaes
I just realize you have to remove the port
now to connect it w bluetooth apps..
well, first, make sure both motor A and motor B work
motor b doesnt work anymore
Well it only took 1,100 messages
coppers got cut off
so I fixed it myself only to make it worse
ok, then, try your dabbler code
make sure the pin numbers in your code match how it is actually wired
how do I make sure my wires stay on the wheels btw?
are they not soldered?
no, when I tried to, it only got sticky and it didnt really melt
I just have soldering paste
then all you can do is twist them tightly
you need solder, not just soldering paste
Woohoo! Cheers mate! Finally
so I don't need my powerbank to power my esp32 right
btw can I replace servo motor instead of dc motor for the non working wheel
cuz it seems to save by itself
No mate, dont, you are not finished yet.
Star I recommend adding an ultrasonic sensor to the car after you finish the motor stuff
yeah I'm not, for final layout I mean, I still haven't connected with dabbler lol
ooh I have one
what for though? How can I connect it w esp32
wiring I mean
also idk how to code sensors HAHAHAHAHA but I'll try
I'll send a pic of the board
WORRY ON THE MOTORS FIRST
but the sensor is for detecting obstacles
Just breath, you are on the right path. Read what Anon said last. You must have control of the motors. They spinning only tells us "they just work".

I don't know what to do with the non working motor, tried to fix it myself and only made it worse
so the powerbank is pretty useless now right
you can power the esp from the L298
do I just remove this thenn

all you do is add ONE WIRE from 5v to 5v on esp
then the whole thing is powered by yuor battery pack
@AnonEngineering how hard is PWM in cpp to learn
analogWrite(MY_PWM_PIN, speedValue):
on ESP it's a little trickier👍
compiled and ran the code once more... its not running again
maybe I just turn it on and off
like remove from the breadboard and put it back
you guys how exactly does this thign work
what code?
the one you gave me
ok, it worked, so most likely you knocked a wire loose
uh huh...
found it, my gnd wire
Once it runs again, make sure you understand why its running So you dont get so desperate about why is that.
but can you guys exactly how this thing works
There.
It’s just MOSFETS being controlled by signals
It also has inbuilt flywheel diodes
how do I turn it on and off
If the motor is connected to output 1/2, you either need to make input pin 1/2 high or low
We can explain you as soon as you get it working. Just focus on your task now.
okay, I'll eat and get prepared, two hours late to schoool, but it's an entrance
also they were making fun of me cuz they thought I wasn't capable enough to do the work LOL and cuz I didnt show up for the assembly of the parts
We always knew you could do it. Just go eat
alrighttt
next agenda for me;
- assemble exterior
- try to connect to dabble
- test run
worried ab the other motor tho
Add the ultrasonic sensor… it’s not hard to code, and you can incorporate obstacle detection
Will it run on its own, or make some noise?
that would be cool
The sensor is quiet
The sound waves it makes is to high (or low) than human ears can hear
go eat already!
I don’t really remember
I'm eating while talking to y'all
HAHAHHAHA
If this thread reaches 2000 texts can we have an party or smth cuz we probably beat the record for his server
😂 🤣
LOLLLL
btwww
@alexsbmagalhaes
@AnonEngineering
before I get back and add more, can you tell me how this esp32 works? How will it turn on and off?
same actually
I wanna add some lights too
okay now we wait for another set of instructions HAHAHAHAHAHAHA
It's so very simple, when you have the time, you may watch this video later: https://youtu.be/Ey4xoG970Go?si=tkePvHG377K93ulQ
educ8s.tv
YouTube
How to control a DC motor with L298N driver and Arduino Uno
Welcome to the L298N Arduino tutorial. In this video, we are going to learn how to control a DC motor using an Arduino board. We are going to use a small and inexpensive module that features the L298N motor driver chip.
🛒 Arduino Uno ▶ http://educ8s.tv/part/ArduinoUno
🛒 L298N Driver ▶ http://educ8s.tv/part/L298N
🛒 2 DC Motors ▶ ...
I seem to remember a 4000 or more one
once you load code, the code stays there basically forever until you load new code
turning it on and off is just giving it power or not
The thing is that this thread is less than 24 hours old… that thread was probably months old
it's gonna be ON YOU to get the ultrasonic working, winter is coming 😉
I’ll try
wild ping, you make my robot sing./..
I was going to answer your last message but you deleted it. You guys are just so fast... I suggest you open a new thread for that request. Leave this conversation to help your friend finish her L298 thing.
Please Note: do not use ultrasonic around bats and dogs.. it ticks them off
That’s what I was gonna do. (And I don’t know her )
"One ping Vasily, one ping only..."
I have NO IDEA what that is a picture of
His LEDs dude, the man is so proud of it
I deleted the msg before any of Yall could read about it sry
I wont lie, you guys odyssey about those L298 got me curious. I want to see how it ends. I hope she gets good grades and frigging win this competition.
I am late to the convo - but yeah - best wishes
Dang the imp of moving keys is stong today...
It's so intense, I can quote some of the best phrases:
"should I cut the black or red wire?"
"I'm hitting my keyboard"
"I'm gonna cry"
"I love you"
And many many more
It's better than many tv shows these days
Is there a really big red display with numbers counting down ?
"should I cut the black or red wire?"
Its just a freaking L298 and some bluetooth controlled robot (yes even after a thousand messages we have no much info on what it is)
Anon did all the work. I just told them to come here and almost regretted it.
You know there were 200ish messages in general too, so we are at 1,500 messages rn
I'm starting to worry she won't make it in time
But I have to go to bed
I'm back
time to do the finalizing
and then eventually the wheels
Asssssss an last last last laaaast resort you could make smth like this

3 pm is the deadline, it's 8 today, just did front assembly
Your electronics work
on top of the robot or bottom?
????
I mean inside
whoops
I'm gone already. Just remember where you left:
Anon told you it works, you saw it working, so if it suddenly stops, its most likely a loose wiring. Probably the GND.
thank youuuu
how long will you be here
Star what I sent is an completely different project
He’s sleeping now
I'm gone. Anon knows better than me and probably has more patience 👍
btw will unexposed pins work, I'm running out of patience injuring myself I cut my skin open with a cutter
awww
Best of luck to you
it's a battlebot kinda thing, we have no weapons so we're relying on defense
only exposed metal (copper wire or pins) will work
so I just stick pins to the port??
i don't know what you are asking
so I just stick pins to the port?? That’s sounds wrong
define "port"
the blue things
ahh, they are called "screw terminals"
exposed wirings are kinda pissing me off it wont shoot properly
it would work with a22wg right? It's pointy and perfect lol
those terminals will accept a pretty good range of wire sizes
how about bare pins
Yup
(If you mean DuPont wires or equivalent)
so long as it's metal, not plastic insulation
what a waste
You can’t put the plastic in the screw terminal- your wire can be covered with the insulation
i mean
just one wheel working
It’s better then none 🤣
Is your motor cooked or is it an wiring problem ?

its running again but not on the floor
looks like you ripped the end cap off the motor
im using jumpet for gnd to gnd and it stopped
#include <DabbleESP32.h>
#define IN1 14
#define IN2 27
#define IN3 26
void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
Dabble.begin("BATTLEBOTSCI");
}
void loop() {
Dabble.processInput();
}
GamePad.onPressed(GAMEPAD_UP, {
moveForward();
});
GamePad.onPressed(GAMEPAD_DOWN, {
moveBackward();
});
GamePad.onPressed(GAMEPAD_LEFT, {
turnLeft();
});
GamePad.onPressed(GAMEPAD_RIGHT, {
turnRight();
});
GamePad.onPressed(GAMEPAD_STOP, {
stopMotors();
});
void moveForward() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
}
void moveBackward() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
}
void turnLeft() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
}
void turnRight() {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
}
void stopMotors() {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
}
@AnonEngineering this alr?
i would go with your original (I have it here)
https://wokwi.com/projects/443571952641717249
that code will print out messages making it easier to see what is going on
there's so many problems with this one, I have no idea how to fix it
C:\Users\isa\AppData\Local\Temp.arduinoIDE-unsaved202591-17148-x08uod.03yls\sketch_oct1a\sketch_oct1a.ino: In function 'void setup()':
C:\Users\isa\AppData\Local\Temp.arduinoIDE-unsaved202591-17148-x08uod.03yls\sketch_oct1a\sketch_oct1a.ino:33:3: error: 'ledcSetup' was not declared in this scope
33 | ledcSetup(pwmChannelA, freq, resolution);
| ^~~
C:\Users\isa\AppData\Local\Temp.arduinoIDE-unsaved202591-17148-x08uod.03yls\sketch_oct1a\sketch_oct1a.ino:34:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
34 | ledcAttachPin(enable1Pin, pwmChannelA);
| ^~~
| ledcAttach
exit status 1
Compilation error: 'ledcSetup' was not declared in this scope
ok, the ledC issue is due to the ESP core change
a very technical issue
can you help me tweak it a bit? I don't usually ask for help when coding let alone embedding, but I'm running out of time
lemme see if i can fix it, give me a few minutes
okayyy
see if this works https://wokwi.com/projects/443571952641717249
okay hold on
it might still throw errors, but they should be a little different
@AnonEngineering hope ur still there, I still need u around hehe cuz I havent tested LOL
try to compile it, see what errors are there
Star any progress
it said "do you mean ledcattach" which was odd, I saw both put there
not yettt
Maybe instead of Bluetooth do an AP access point webserver hosted by the ESP32?
you can tweak it a bit too
ahhh I have an hour left to go to school LOL
The access point works reliable and it’s imbedded in normal arduino ide (cpp) code
But it uses more power
(I think)
Anyways star do you want an demo of how to webserver works
ohhh
I'll be connecting it with dabble though
Do you have enough time
@AnonEngineering
an hour left
well, less than an hour
I was looking at it myself as well
it seems to be fine
@AnonEngineering says you didnt define ledsetup?
There's no setup being stated this is so confusing
let me go look at the official dabble format lol
oh btw I see you input motor b
do I still have to?
It's not working at all and I removed wiring
LOL
I added that while it was
does that last code now compile OK?
C:\Users\isa\AppData\Local\Temp.arduinoIDE-unsaved202591-17712-hecn90.iur46\sketch_oct1a\sketch_oct1a.ino: In function 'void loop()':
C:\Users\isa\AppData\Local\Temp.arduinoIDE-unsaved202591-17712-hecn90.iur46\sketch_oct1a\sketch_oct1a.ino:59:19: error: 'BUZZ_L' was not declared in this scope
59 | ledcWriteTone(BUZZ_L, freq);
| ^~
C:\Users\isa\AppData\Local\Temp.arduinoIDE-unsaved202591-17712-hecn90.iur46\sketch_oct1a\sketch_oct1a.ino:61:19: error: 'BUZZ_R' was not declared in this scope
61 | ledcWriteTone(BUZZ_R, freq);
| ^~
exit status 1
Compilation error: 'BUZZ_L' was not declared in this scope
ok, once more time, refresh that link and copy code
how does it still have all these errors? I haven't read a single possible error
that remaining error was b/c i forgot to delete smth
you'll notice
BUZZ_PIN
is kind of odd here 🙂@AnonEngineering another error
hold on
huhh
what, i can't "guess the error"
I don't see any plausible errors
wait maybe I input the old one
it has the buzz_l indicated
it's taking a cute while huhh
you didn't refresh
no I mean the compilation
it's sooo slowww
it is slow on ESP
alright
@AnonEngineering now its just compilation error
this doesn't have to do anything w code right?
what is the error?
sighhh
idk if I can make it
like on time
that is a problem with the dabble library, i can;t fix that
OHHHH
let me try to see
both are in latest versions so I don't think there's a problem

SORRY ANON
I'M ALMOST THERE I APOLOGIZE IF IM TREATING THIS SERVER LIKE A BECK AND CALL
looks like last release was 2019, but somebody was poking around in there last year
https://github.com/STEMpedia/DabbleESP32
what is the version named?
idk, i'm not having any luck playing around on the Dabble page https://ai.thestempedia.com/docs/dabble-app/getting-started-with-dabble/
can you get any Dabble example to run?
uhhh wdymm

Really hoping you guys fix it. If you can't make everything work, just get her a minimal working thing. I also went to a robot fighting, almost 20 years ago... 🧐
Wish you the best 😴
i'm not sure Dabble has been updated to support the ESP32 V3 core
ooohh, where'd you see this?
uhh google says yes

I hope it'll work
under File | Examples, whenever you install a library it comes with examples
OHHH
ohh, yep

this is my first time using the compiler, so what does this mean btw?
see if an example runs, like "AllMotors"
a compiler takes your C++ code and compiles it into a binary file the chip understands
welpp

try to upload it
alrightt
oh my gosh
compiling sketch can't be this slow
@AnonEngineering
yeah, the library needs updating
how do I do that, by the way? it says the latest version is instaled
it is a huge job, the authors would need to dig into it
oh noooo
I would need to use anothee app 😭
yes, one that has been updated recently
Idk how to use blynk iot but I'll try to find a format code for me to reference
you want BT control?
yuppp
look for some kinda BT app for your phone, but you are kinda out of time now
do I have to install the app or will web be fine, or both
it's okay
you need to first be able to "talk" to the ESP, then write some code to take that data and drive your motor
I'm sorry for asking for spoonfeeding atp with the code
Anyways won’t an WIFI AP be easier?
@AnonEngineering
if latency isn't an issue
I made an project with like no latency
I can show you
With an AP
the floor is yours 🙂
but is it okay if I ask for you writing the program @AnonEngineering and then I connect it with the bluetooth, I'm genuinely less than 30 mins left
i'd look for existing examples
or try AARAVs code
ughhh is it possible I connect it through website instead of app, both my devices are password protected
mom said she doesn't know the password anymore
Well I can’t find the video… if you really want the code/project, click my bio, go to my YT channel, and then find the short titiled “LED WEB-SERVER”
man
I really have to go now
K
I still think AP is the best option you have rn
but I can'tttt
Why
I still haven't connected w bluetooth
I can't turn this in
You don’t NEED Bluetooth for AP
ughh, embedding takes so much and now problem is code
AP?
sorry, I can't browse rn, can you perhaps copy an example here
an WiFi access point
@AnonEngineering last time when I compiled from dabble, it was working
The Esp32 basically makes its own WiFi network, which you can connect to and visit an up address to have an website
try your old code, maybe if it doesn't try to use PWM it'll work
what just happeneddd
@AnonEngineering
I tried to run another test code, just in case
Sketch uses 298843 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20704 bytes (6%) of dynamic memory, leaving 306976 bytes for local variables. Maximum is 327680 bytes.
A fatal error occurred: Could not open COM5, the port is busy or doesn't exist.
(could not open port 'COM5': FileNotFoundError(2, 'The system cannot find the file specified.', None, 2))
Hint: Check if the port is correct and ESP connected
esptool v5.0.0
Serial port COM5:
Failed uploading: uploading error: exit status 2
the same one maderdash used
and all of a sudden port doesnt recognize, I'm baffled
my esp32 seems to be dimming as well
Unplug and check wiring
Dimming is never good
what does it meannn
there we goooo, blinkimg again
It means you have a wiring problem
ohh, yeah, port isnt recognized earlier
btw, how does esp32 work again? remove the computer port?
@AnonEngineering I think chat gpt can handle making an simple AP access point code (for the record) cuz I have made wayyyyy more complicated codes using it
We don't condone AI code
like, if we want it to get it running
What part of wiring error isn't making sense?
It blinked again cuz I replugged it
Ik, but 𝐝𝐞𝐬𝐩𝐫𝐚𝐭𝐞 𝐭𝐢𝐦𝐞𝐬 𝐜𝐚𝐥𝐥 𝐟𝐨𝐫 𝐝𝐞𝐬𝐩𝐫𝐚𝐭𝐞 𝐦𝐞𝐚𝐬𝐮𝐫𝐞𝐬
I'm trying to run a test code, but I don't know exactly how it turns on
It either uploads or it doesn't
ohhh
huhh I thought I solved the wiring problem as well
but when I removed it from laptop port it dimmed again @AnonEngineering
Perhaps your batteries are dying
oh noooo, I'm using double a
it does die easily
I forgot to switch it off
I'll check voltage
alright
it's lower than usual
sighhh
It needs to be above 7v
@AARAVmakes you can tell me about the ap access while you're at it
my school is kinda over now but the event starts at 3
Based on the math I did earlier,. each motor will get 2.5v if the total input voltage is 9v
yep, it is 9v
I didn't knew they can die this quick
lithium really is stronger
You can see in this vid how an AP can be uses
would I need my own wifi?
It's gonna be in school where I control it
ughhh just when we're nearly there
NO, in an AP the ESP makes its own wifi, which you connect too
@AnonEngineering I switched batts, uploaded the whole thing, and now It won't runnn
ohhh, can you dm me how I do that
Idk, I just used AI code...
oh
Check wiring
I thought I was over this problemmm
seems to be fine, what in specific should be checked?
You could probaly find videos online about how it works. (coding this would require learning 2 other coding langages too)
okay, but whats the whole thing called again?
HUHH
An web server or internet access point (AP) hosted on ESP32
when I removed the gnd pin it spun
LOLL
🤣 😂 🤣 😂 🤣 😂
Throwing batteries isn't good 😊
hmmm
come to think of it
do I really need a controller
Are we doing bluetooth?
I think you really need 2 motors
Honestly i agree
its supposed to be a battebot
2 motors might be requied
Is your strat to go infiently in circles?
no, but now that you mentioned it...
Idk how to push the other bot out of the arena though
I need a controller in some sort
spinning is fine
@AARAVmakes how do you access the website
hmmm
I do have some infrareds over here
Via an IP adress
Usually 192.168.4.1
In an browser like google
@AnonEngineering Hiii, sorry once again but

was wondering if I could make use of these
to connect to esp32 and my motor board instead
I gtg i gt sleep i have school tomorrow
that'll take another tedious trial and error
alrrr gn
If you have an IR receiver

Looks like a thermocouple
oh
well
@AnonEngineering
must be this one?
Ir receiver has 3 leads
it has three leads

oh i meant another pic

here

That could be infinite things
It's probaly an transistor what are the numbers in it
Probably a transistor
2224
i Could repurpise this transistor right
Back to the controllers are we doing bluetooth or AP
Yeah
alright, for the remote as well?
Ni
*no transistors serve an different purpose
that would take even more trial an error I was thinking manually
but rn idk if I even have a transistor
So no control ?
You know what lets do api
should connect it w my phone right?
take the floor @AARAVmakes
I gotta sleep so Anon Might be able to help you
You might be deep fried
he's been bothered for a while now HAHAHAHA
I have to go to sleep as well
Yup your deep fried
You prob gotta mess with chat GPT to mean what an AP is and to code it. Make your prompts as detailed as friggin possible @star but your probably deep fried
1.7k msgs
ghhhh
Im On my way! rnto school
no controllers or infrared anything
it stays in one place and spins really fast
yooo @AnonEngineering
@AARAVmakes
y'all what happened? its blinking blue but it wont spin

@star LOOKS LIKE THEY WENT TO SLEEP
yeah
so whats the plan ?
we lost anyway
😬
I would set up a timer to the bot and then start the motor full speed, even if it only spin in circles and try my luck. It's the best you can do with this little time.
Yeah, sorry it didn't work out...
it's fine HAHAHHAHA