@MBC022 When there is nothing connected to an I/O pin it picks up random signals. When you don't press the button the circuit is incomplete and therefore you need to tie the pin to ground without shortcutting the circuit. 10k prevents the circuit from shortcutting.
Hi Jeremy, thanks for posting these tutorial videos, they have been VERY helpful. I am in the process of earning my AA degree in electronic technology and am half way through, and am just getting into the basics of Arduino. I just bought the Uno tonight and have gone through your first 2 tutorials, and they have been a lot of fun. I look forward to continuing with your tutorials as I know these first two are just the tip of the ice burg. Keep up the great work!
@runizgozilla "pmsing""joke" WTF how old are u kid ? and to be fair when you right an abusive Msg at least have the balls to follow through with your shit head comments, rather than bitching out with ohhh it s a joke. Ur the joke PUSSY!
""pmsing" "joke" WTF how old are u kid?" really? you made me laugh so hard. and last time i checked, you cant "right" comments, much less abusive ones
to be honest with you, i didn't think you would come back at me like that. well, since you did:
1) Why are you defending this man like that? You like bros or something?
2) and i'm not "the joke", i just made a joke. Get it straight
3) speaking of getting things straight, your spelling could use some work
I have mine hooked up exactly like yours in the first part but my light always stays on and when I press the button the light goes off. I've rechecked the sketch and wiring and it's exactly like it should be, what can it be? If I follow this demo all the way to the end it works correctly but if I go back and load the first part of the sketch (just like in the beginning) it's still backwards. I'm stumped.
Like for the Resistor, How is it not going to pin8 but somehow going to ground through the resistor? Arnt they both on the same line on the breadboard?
@AnnoyingXboxer The resistor is a "pull-down" resistor, meaning it will be connected to ground. This is because when our push button is not pressed, the arduino board will read a low value, and when we press it will read the high value. If we didn't place a resistor we will short-circuit the power signal with ground! Too much current will be driven and we could damage the circuit.
@AnnoyingXboxer Yes, since it is a pull-down resistor (connected to ground). If it was a pull-up resistor (normally on; we push to obtain a low value, the current will be flowing through the resistor all the time except when pressed). I hope I haven't messed you up :S
@jgrecoarroyo So when i push that button what is exactly happening? Because i thought perhaps the button blocks the flow and when you press it, it allows the flow.. Is that correct?
I'm wondering if anyone on here could take a look at a few lines of code that I have written. I am trying to just make sure a small video camera stays on and stays recording, I am going to put it in a weather balloon. I believe it to be very simple code (to someone who know what theyre doing) but I have had some trouble with the REC button working. I have sent Jeremy Blum a msg directly via FB but he never responded. Please respond to this post if ur interested or email bryan246@gmail.com thanx.
What exactly is the button doing when you click it? What is the hardware doing to make the electricity goto ground threw the diode, rather then the orange wire to pin 8?
I have problem whiw my arduino duemilanove 2009 I load button sketch and set button and resistor.
It doesn't work, LED is on alltime even when I take wires from pins. Led turn off when i touch a housing of usb socket . Led turn on when i put my hand near board and turns off then i take my hand off.
@sciguy14 I'm doing the motor control with PWM input to arduino, from flight Simulator.
For example, less than 1ms will move the motor to the left, 1 ms will be the stop position and more than 1ms will move the motor to the right. Let say, PWM is now 1.5 ms and if it changes to 1.3ms, i have to reverse the motor direction too.
Do you have any idea about it and may i request you to give me some ideas in programming part too :D?
@LeoDheLion Use millis() to start a timer and see how much time elapses between pulses. If that's not fast enough, you might need to use a timer interrupt. I have blog post on the subject.
Thanks heaps mate. I have started following a few videos. My ultimate goal is to make a baby monitor. On detection of a sound signal, I want the LED to flash a message; say; "baby crying".
one little tip...its a general good idea if you are wanting to put the code up on the internet...because even tho you are doing it correctly there is a chance or the code not being just quite right
I get an error that says Problem uploading to board (then gives me a link to an arduino page that I have read through over end over, still nothing) error:
OK ANYONE PLEASE HELP THERE IS THIS PROGRAM FOR THE ARDUINO I THINK IT COST LIKE 15 DOLLARS BUT YOU DRAG BOXES AND THE BOXES ARE FILLED WITH CODE . ITS A REALLY COOL PROGRAM I JUST DONT KNOW THE NAME OF IT. PLEASE REPLY BACK IF YOU HAVE ANY IDEA WHAT ITS CALLED
Hello, I've done an adjustable fading led on a 8051 years ago. I remember that I had problem with the logarithmic reception of the human eye. Therefore I had to add a logarithmic curve to the increase and decrease of the pwm to achieve the illusion of a smooth fading led. Now I'm curious why your led fades so pretty although your doing a linear increase O.o
i have a question and i would very much appreciate it if you would answer it... i have five loops and i would like my arduino to run just one... untill i push a button... at which point i would like the arduino to advance to the next loop... and so on and so forth untill it reaches the fifth loop... where it will run the first loop again... could you help me out?
@legoclockfreak710 Use a button to trigger an interrupt. Keep track of what loop you are in using a global variable. Each time the interrupt triggers adjust the variables that determine whether the loop is running.
@sciguy14 Can you please explain why you used the resistor connected to the ground button? I didn't quite understand it, and although I googled it i couldn't find an answer.
Jeremy, have a question for you you have you switchPin set to an input...when i had mine set up this way the led stays on when I made switchPin an Output it fixed the problem..have any clue why that would happen. I am new at this so it may be a trivial thing.... thanks
@bassmike30 Mate, I had the same problem and then realised I didn't connect the resistor from the button to ground at all. Make sure the resistor is there 4:00 :D
Thanks Jeremy! This is exactly what I need. I'm going to buy my first Arduino Uno this week and wirte my first program... Again Thank you, I'll keep you posted!.. Again thank you and keep making great video....
//My debounce method is designed like this: if (digitalRead(switchPin) == HIGH) { delay(5); if (digitalRead(switchPin) == HIGH) { digitalWrite(ledPin, flat); flat =! flat; }
}
//Unfortunately, it doesn't work very well. Why?
//Can you tell me the difference between yours method and mine in function?
Could you please tell me why you added a resistor to the switch? The circuit is interrupted when you release the switch, so I don't get it why you should add a resistor.
@Pvsmuntje The resistor pulls the pin up to a default value when the button is released. Otherwise, the input would float at a random value. You cannot assume that the voltage on the pin will always be high or low, when it is not connected to anything.
@Pvsmuntje It will also limit the current introduced to the pin to Voltage/resistance, look up datasheets for various devices to see what safe input current limits are will save you a few pennies.
No, like most processors, it is single-threaded. But you can use interrupts to monitor multiple buttons simultaneously. I will discuss these in tutorial 10. If you wan to use a multithreaded processor, I'd recommend the parallax propeller.
hey dude, there is a slight problemo can arduino have more than 2 loops at once that means operate 2 buttons at the same time .i am new to this just wanna know.can i have your email address tooo :D
@theekshana12 No, like most processors, it is single-threaded. But you can use interrupts to monitor multiple buttons simultaneously. I will discuss these in tutorial 10. If you wan to use a multithreaded processor, I'd recommend the parallax propeller.
@theekshana12 No, it's a completely different architecture, but better for multithreaded applications. Watch my roboclaw or deepnote guitar hero bot videos. They both use the propeller. However, for simple multiple buttons presses, you can accomplish that using the arduino and interrupts.
Another way to illustrate a pull up/down is to picture a wimpy spring on a light switch. If you have the spring pulling the switch low, you can over-power the switch easily, but when you are not touching it, it will always return to 'off' (or the other way with tying it high).
@glennlopez I will explain this topic further in next week's episode. You can think of a a pulldown or pull resistor as setting a "default value for the pin. When the button is unpressed, the I/O is connected to ground through the pulldown resistor, causing the arduino to read a logical "0". The pulldown prevents the voltage level from "floating". When the button is pressed, the I/O pin is connected directly to 5V (with no resistor), so it reads a logic "1".
Hey jeremy, i just got a new computer. How do i set up the internet? Its upstairs so i plugged in a new router. But i cant find my local connection i use for my other computers? Do you know what to do? PM me please!
Can I ask you something? How did you become so good at computers? I read and read all the time about different things about computers to build my knowledge and it's never enough. I want to become a computer technician one day. I can't go to college to learn because they don't have courses on computers here. Any advice or guidance on how I can become better at computers?
@WindowsVideoArchive You can only get so far by reading. You need to get your hands on actual technology and start messing with it. That's the only way you'll learn it inside and out.
@WindowsVideoArchive reading, practising and asking questions :) that's how I get a lot of knowledge about computers.. it took me about 4-6 years but im pretty good at this now ...
oh jeremy,i have a question,is the 5v power supply on the uno safe to plug in a toy motor? (knex motor) i,m gonna use a transistor to switch it,so it won't be directly connected to one of the digital pins.
@djtowo You should measure the current draw of the motor - USB can only supply so much. I'd recommend hooking up a separate 9V and powering the motor with that (or regulating it to 5V first).
Many thanks!
raccoonDogfly 4 days ago
My brother is playing WOW so i have to watch this in 240p...:( firstworldproblems
M1America 1 week ago
How do you determine proper capacitor/ resistor sizes?
DHubert777 1 week ago
@DHubert777 watch tutorial 3. Basically Ohm's law.
DethScarred 1 week ago
Comment removed
Claytron830000000000 1 week ago
This is super helpful
Xielothan 2 weeks ago
how i can interface imu 6d0f with arduino plz help...?
engrkazmi 3 weeks ago
THANKS FOR these amazing tutorials!
kpopRC 3 weeks ago
@MBC022 When there is nothing connected to an I/O pin it picks up random signals. When you don't press the button the circuit is incomplete and therefore you need to tie the pin to ground without shortcutting the circuit. 10k prevents the circuit from shortcutting.
keoni29 3 weeks ago
Hi Jeremy, thanks for posting these tutorial videos, they have been VERY helpful. I am in the process of earning my AA degree in electronic technology and am half way through, and am just getting into the basics of Arduino. I just bought the Uno tonight and have gone through your first 2 tutorials, and they have been a lot of fun. I look forward to continuing with your tutorials as I know these first two are just the tip of the ice burg. Keep up the great work!
mskelly84 1 month ago in playlist Tutorial Series for Arduino
could someone explain me the reason for the "pull-down" resistor?
MBC022 1 month ago in playlist Tutorial Series for Arduino
It's even more fun writing it in asm.
TheLightningStalker 1 month ago
Congratulations. Your tutorials are great. Really interesting what PWM is and the need of debounce funtion.
Also I find incredible the quality of the videos. Which software do you use for video editing? Camtasia? Those smooth scrolls are great.
pepicolorin 1 month ago
You rock thank you very much!
Rebuilder11 1 month ago
the LED just stays on, weather i press the button or not. HELP!
Hay1tsme 2 months ago
This comment has received too many negative votes show
Jeremy,
Were you super NERVOUS the first time you swallowed your BOYFRIEND'S LOAD OF JIZZ?
jls6318 2 months ago in playlist More videos from sciguy14
is there a guy with a gun behind your camera? or why do you keep nervously glancing behind it???? I MUST KNOW
runizgozilla 2 months ago in playlist Tutorial Series for Arduino
@runizgozilla he has a script to work with and he is doing well so stop hating and try learning somit you fucking mong
jnewbon00 1 month ago
@jnewbon00 stop pmsing and i might learn "somit"! can't take a joke...
runizgozilla 1 month ago
@runizgozilla "pmsing""joke" WTF how old are u kid ? and to be fair when you right an abusive Msg at least have the balls to follow through with your shit head comments, rather than bitching out with ohhh it s a joke. Ur the joke PUSSY!
jnewbon00 1 month ago
@jnewbon00
""pmsing" "joke" WTF how old are u kid?" really? you made me laugh so hard. and last time i checked, you cant "right" comments, much less abusive ones
to be honest with you, i didn't think you would come back at me like that. well, since you did:
1) Why are you defending this man like that? You like bros or something?
2) and i'm not "the joke", i just made a joke. Get it straight
3) speaking of getting things straight, your spelling could use some work
and how old are you?
runizgozilla 3 weeks ago
@runizgozilla TBH your punctuation aint exactly bang on either. And in regards to your attempt to scratch back some credibility you have failed
1) You dont know me so that explains why you would not expect me to "come back at you" like that
2) I am in now way related to this guy refer to points 3, 4
3) To be fair i have got it straight you are a joke for picking on someone who you think would not fight back.
4) Its my job to protect people from persecution / bullets,
I am in the military.
jnewbon00 3 weeks ago
@jnewbon00 well then, you sir, have my respect!
apologies
(the punctuation issues were added afterwards to save characters)
runizgozilla 3 weeks ago
you sir, are fucking excellent
UncleSam493 2 months ago in playlist Tutorial Series for Arduino
This has been flagged as spam show
I have mine hooked up exactly like yours in the first part but my light always stays on and when I press the button the light goes off. I've rechecked the sketch and wiring and it's exactly like it should be, what can it be? If I follow this demo all the way to the end it works correctly but if I go back and load the first part of the sketch (just like in the beginning) it's still backwards. I'm stumped.
cputampa 2 months ago
Comment removed
cputampa 2 months ago
For wiring something like this what Gage wire do u suggest?
Squirrle4620 2 months ago
@AnnoyingXboxer you need a resistor to limit the current, otherwise it will be bad for the arduino AND the LED
MinecraftTechnic 2 months ago
Like for the Resistor, How is it not going to pin8 but somehow going to ground through the resistor? Arnt they both on the same line on the breadboard?
AnnoyingXboxer 2 months ago
Can some one explain what exactly that Resitor is doing? I know he is sending it to ground... But why do you have to do that?
AnnoyingXboxer 2 months ago
@AnnoyingXboxer The resistor is a "pull-down" resistor, meaning it will be connected to ground. This is because when our push button is not pressed, the arduino board will read a low value, and when we press it will read the high value. If we didn't place a resistor we will short-circuit the power signal with ground! Too much current will be driven and we could damage the circuit.
jgrecoarroyo 2 months ago
@jgrecoarroyo check: acroname.com/howto/button/pushbutton.jpg
jgrecoarroyo 2 months ago
@jgrecoarroyo So the only time electricity flows through the resistor is when the button is pushed right?
AnnoyingXboxer 2 months ago
@AnnoyingXboxer Yes, since it is a pull-down resistor (connected to ground). If it was a pull-up resistor (normally on; we push to obtain a low value, the current will be flowing through the resistor all the time except when pressed). I hope I haven't messed you up :S
jgrecoarroyo 2 months ago
@jgrecoarroyo So when i push that button what is exactly happening? Because i thought perhaps the button blocks the flow and when you press it, it allows the flow.. Is that correct?
AnnoyingXboxer 2 months ago
Thanks a million for these vids dude, soo helpful for a nooby like me
philnicholl13 3 months ago
Question: Can someone explain the circuitry to me? i don't quite understand what was going on there.
bleachzeldakid 3 months ago
Y U NO digitalWrite(ledpin, digitalRead(switchpin))
123456789robbie 3 months ago
Mr. Blum, you rock and thank you.
steelmesh 3 months ago
sound of keyboard typing is so soothing
otamanlvhs 3 months ago 8
@otamanlvhs i find his voice soothing too
123456789robbie 3 months ago
Comment removed
DarkAngel63725267 3 months ago
what is Auduino, and what is it used for , can u please tell me thank you
MrAnimeking9000 4 months ago
@MrAnimeking9000 watch the first video, or read up at arduino.cc
123456789robbie 3 months ago
I'm wondering if anyone on here could take a look at a few lines of code that I have written. I am trying to just make sure a small video camera stays on and stays recording, I am going to put it in a weather balloon. I believe it to be very simple code (to someone who know what theyre doing) but I have had some trouble with the REC button working. I have sent Jeremy Blum a msg directly via FB but he never responded. Please respond to this post if ur interested or email bryan246@gmail.com thanx.
Bryan7346 4 months ago
im sort of confused on one part..
What exactly is the button doing when you click it? What is the hardware doing to make the electricity goto ground threw the diode, rather then the orange wire to pin 8?
AnnoyingXboxer 4 months ago
could u control a fan by PWM from an arduino?
MissisipiHipi 5 months ago
Hi
I have problem whiw my arduino duemilanove 2009 I load button sketch and set button and resistor.
It doesn't work, LED is on alltime even when I take wires from pins. Led turn off when i touch a housing of usb socket . Led turn on when i put my hand near board and turns off then i take my hand off.
Please help me
OnlyTrueAnfoman 5 months ago
Thank you Jeremy
CURISION 6 months ago
Hi, I have few questions regarding the input and output of arduino.
Can i use pulse width modulation as an input to arduino?
What's is the waveform for arduino's output and what's the output voltage will be?
Hope you can help. :D
LeoDheLion 6 months ago
@LeoDheLion Do want to read an input PWM as an analog voltage? You'll need to smooth it out with a capactor. The output is 5V.
sciguy14 6 months ago
Comment removed
LeoDheLion 6 months ago
@sciguy14 I'm doing the motor control with PWM input to arduino, from flight Simulator.
For example, less than 1ms will move the motor to the left, 1 ms will be the stop position and more than 1ms will move the motor to the right. Let say, PWM is now 1.5 ms and if it changes to 1.3ms, i have to reverse the motor direction too.
Do you have any idea about it and may i request you to give me some ideas in programming part too :D?
LeoDheLion 6 months ago
@LeoDheLion Use millis() to start a timer and see how much time elapses between pulses. If that's not fast enough, you might need to use a timer interrupt. I have blog post on the subject.
sciguy14 6 months ago
@sciguy14 May i have the link to your blog :D?
It's really important for me bcz It's my sch project :) thank alot
LeoDheLion 6 months ago
@sciguy14 Hi, if you're willing to help me out, let me be more specific with my plan/idea :D.
Let say , my PWM input range is from 0.5ms to 1.5ms . so, i want to define 0.5ms as -100%, 1ms as 0% and 1.5ms as +100%, in ardunio.
I will have an another input from motor feedback from potentiometer, to detect the position of motor.
Let say, my feedback range is from 0 ohm to 10 ohm. so, i want to define 0ohm as -100%, 5ohm as 0% and 10 ohm as 100%, in ardunio.
LeoDheLion 6 months ago
@sciguy14 After defining two inputs, i have the formula (Pwm input% - feedback% = result%).
I would like two have the final output as two bits.
If the result% is +ve, i want to have two bits output as bit1= 0 and bit2= 1.
If the result% is -ve, i want to have two bits output as bit1= 1 and bit2= 0.
Can you kindly help me with the programing for above case:D.
Your help is much appreciated.
LeoDheLion 6 months ago
@LeoDheLion Hi mate, I'm doing a similar project, would I please be able to get the code for this off you? Thanks.
cxdougxw 3 days ago
thx. very helpful.
DougGirard 6 months ago
Thanks heaps mate. I have started following a few videos. My ultimate goal is to make a baby monitor. On detection of a sound signal, I want the LED to flash a message; say; "baby crying".
jay15183 6 months ago
one little tip...its a general good idea if you are wanting to put the code up on the internet...because even tho you are doing it correctly there is a chance or the code not being just quite right
clony101 7 months ago
My finger smell like peanut butter.
LolTechTutorials 7 months ago
I do not understand the boolean function parts. Specifically, what does the following do?
- boolean debounce(boolean last)
- return current;
- currentButton = debounce(lastButton);
Thanks in advance!
djfoo000 7 months ago in playlist Tutorial Series for Arduino
wow... wish I had a breadboard that big.... wonder if radioshack has one XD
trevosh15 7 months ago
@trevosh15 I haven't seen any this big at Radioshack - had to order it online. Totally worth it though.
sciguy14 7 months ago
@trevosh15 You can get them at fry's
LolTechTutorials 7 months ago
This has been flagged as spam show
@LolTechTutorials They are like five bucks
LolTechTutorials 7 months ago
Nevermind, I managed to fix the problem :D
JtflStudios 7 months ago
Sorry, flooby100 again... I was logged into the worng account :P, if anyone has the answer to my question, please respond to this message!! Ty :P
JtflStudios 7 months ago
I get an error that says Problem uploading to board (then gives me a link to an arduino page that I have read through over end over, still nothing) error:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
HELPPPPPPPPP!!!
flooby100 7 months ago
@flooby100
Did you use windows xp? If you did, get a pc with windows 7.
lolypopboy777 7 months ago
all your videos are very well presented. Keep them coming :)
blossfb 7 months ago 29
@blossfb Thanks, I will!
sciguy14 7 months ago
OK ANYONE PLEASE HELP THERE IS THIS PROGRAM FOR THE ARDUINO I THINK IT COST LIKE 15 DOLLARS BUT YOU DRAG BOXES AND THE BOXES ARE FILLED WITH CODE . ITS A REALLY COOL PROGRAM I JUST DONT KNOW THE NAME OF IT. PLEASE REPLY BACK IF YOU HAVE ANY IDEA WHAT ITS CALLED
THSO360mods 8 months ago
@THSO360mods i think that was a programming thing google made for the android.....
sportmanic50 8 months ago
its called app inventor by google labs
sportmanic50 8 months ago
Nice tutorial but for the debouncing thing , couldn't you just add the delay(5); after the void loop (){ ?
spyridonas23 8 months ago
these 'program codes'... you just have to study them in the beginning? but once you know them its easy?
kcinkcinkcinnick 8 months ago
I would have put the first if/else statments in a new if loop, more code less hassle.
just sayin.
And the long pin on the LED is the Anode (positive) and the short is the Cathode (negative) it is easier to remember.
GegoXaren 8 months ago
Hello, I've done an adjustable fading led on a 8051 years ago. I remember that I had problem with the logarithmic reception of the human eye. Therefore I had to add a logarithmic curve to the increase and decrease of the pwm to achieve the illusion of a smooth fading led. Now I'm curious why your led fades so pretty although your doing a linear increase O.o
leo2kleo 8 months ago
this became very complicated very quickly xD
Slench101 8 months ago
AWESOOOOOMEEEEE!! MAAAN !!!! WOHOOOOO THANK YOU SO MUCH HONESTLY !
pinochska 8 months ago
Yes it works :D
lolypopboy777 9 months ago
i have a question and i would very much appreciate it if you would answer it... i have five loops and i would like my arduino to run just one... untill i push a button... at which point i would like the arduino to advance to the next loop... and so on and so forth untill it reaches the fifth loop... where it will run the first loop again... could you help me out?
legoclockfreak710 9 months ago
@legoclockfreak710 Use a button to trigger an interrupt. Keep track of what loop you are in using a global variable. Each time the interrupt triggers adjust the variables that determine whether the loop is running.
sciguy14 9 months ago
@sciguy14 thanx!
legoclockfreak710 9 months ago
@sciguy14 also all variables that you read/modify in ISR and use in main application loop have to be declared volatile
elendal 7 months ago
please make an extra effort to speak a little clearer I like your tutorial sometimes I just do not understand
some words I can not find any one in my language
Hoowtoall 10 months ago
@sciguy14 Can you please explain why you used the resistor connected to the ground button? I didn't quite understand it, and although I googled it i couldn't find an answer.
Thanks in advace,
ZeMike from Portugal.
im18andu 10 months ago
can I power a servo directly from 5V?
013dirtdiver 11 months ago
you deserve more views,subscribers and rates!
cool
I'll be sure to watch all of your vids
casvanmarcel 11 months ago
Jeremy, have a question for you you have you switchPin set to an input...when i had mine set up this way the led stays on when I made switchPin an Output it fixed the problem..have any clue why that would happen. I am new at this so it may be a trivial thing.... thanks
bassmike30 11 months ago
@bassmike30 That doesn't make sense... if you send me your code I can have a closer look.
sciguy14 11 months ago
@bassmike30 Mate, I had the same problem and then realised I didn't connect the resistor from the button to ground at all. Make sure the resistor is there 4:00 :D
brad6193au 10 months ago
Thanks Jeremy! This is exactly what I need. I'm going to buy my first Arduino Uno this week and wirte my first program... Again Thank you, I'll keep you posted!.. Again thank you and keep making great video....
Adobolday 11 months ago
@Adobolday Great! Good luck!
sciguy14 11 months ago
You have a mistake in your code in 10:34 that's why it doesn't work properly.
In the loop function you should change the else function to "ledOn = !ledOn; lastButton = LOW;"
Simple as that!!
pkiriakou 11 months ago
@pkiriakou The mistake was intentional. The final version shown in the video works. I'm walking through the coding process.
sciguy14 11 months ago
@sciguy14 thank you. i didn't get that! great tutorials!
pkiriakou 11 months ago
dude i got lost when you talked about programing
Solarissis 11 months ago
sciguy, you say that when the button is pressed the rading goes to zero.
1) that (thing that goes to zero) is the potential difference right?
2) and when you hold those sticks in the air, what does it show? shouldn't that also be zero?
3) excellent vids!!
shimshir 11 months ago
@shimshir Yes, it means the potential is at zero. The multimeter is testing for continuity.
sciguy14 11 months ago
I see you're at Cornell. Are you majoring in EE? I go to RIT and major in EE and really love this series of video, really great stuff.
wsender 11 months ago
@wsender Cool! yeah, I'm an ECE Major (Electrical and Computer Engineering).
sciguy14 11 months ago
//Question:
//My debounce method is designed like this: if (digitalRead(switchPin) == HIGH) { delay(5); if (digitalRead(switchPin) == HIGH) { digitalWrite(ledPin, flat); flat =! flat; }
}
//Unfortunately, it doesn't work very well. Why?
//Can you tell me the difference between yours method and mine in function?
//and why does't mine work well?
//Thank you
tingychan7 1 year ago
Could you please tell me why you added a resistor to the switch? The circuit is interrupted when you release the switch, so I don't get it why you should add a resistor.
Pvsmuntje 1 year ago
@Pvsmuntje The resistor pulls the pin up to a default value when the button is released. Otherwise, the input would float at a random value. You cannot assume that the voltage on the pin will always be high or low, when it is not connected to anything.
sciguy14 1 year ago
@Pvsmuntje It will also limit the current introduced to the pin to Voltage/resistance, look up datasheets for various devices to see what safe input current limits are will save you a few pennies.
poepflater 1 year ago
//I am a beginner.
//My solution for the second one:
//Just add the following: boolean flat = true;
//And change the void loop part as: if digitalRead (switchPin == HIGH) { digitalWrite (ledPin = flat); flat = ! flat; } else { digitalWrite (ledPin == ! flat); }
//Thank you for your video, I really enjoy it!
tingychan7 1 year ago
Very good, make more :D
shebotnov 1 year ago
@shebotnov There are more.
sciguy14 1 year ago
@sciguy14 yea I know, what I mean was dont stop doing those =) Making a robot would be great, explaining H-bridge and stuff.
shebotnov 1 year ago
No, like most processors, it is single-threaded. But you can use interrupts to monitor multiple buttons simultaneously. I will discuss these in tutorial 10. If you wan to use a multithreaded processor, I'd recommend the parallax propeller.
sciguy14 1 year ago
hey dude, there is a slight problemo can arduino have more than 2 loops at once that means operate 2 buttons at the same time .i am new to this just wanna know.can i have your email address tooo :D
also this is a great tutorial
theekshana12 1 year ago
@theekshana12 No, like most processors, it is single-threaded. But you can use interrupts to monitor multiple buttons simultaneously. I will discuss these in tutorial 10. If you wan to use a multithreaded processor, I'd recommend the parallax propeller.
sciguy14 1 year ago
@sciguy14 does parallax propeller use the same code like arduino
theekshana12 1 year ago
@theekshana12 No, it's a completely different architecture, but better for multithreaded applications. Watch my roboclaw or deepnote guitar hero bot videos. They both use the propeller. However, for simple multiple buttons presses, you can accomplish that using the arduino and interrupts.
sciguy14 1 year ago
@sciguy14 in this tutorial the line boolean current = digitalRead(switchPin); if (last != current)
you didnt define what last is ?
theekshana12 1 year ago
@theekshana12 the "last" variable is passed into the function when it is called.
sciguy14 1 year ago
You're so good at it, i got so much to study!
TheBetterPeter 1 year ago
nice video, and thanks for advice/ help - last week sciguy, worked a treat.
Thom in Scotland.
fuelban 1 year ago
these are great youtube videos,keep up the good work
transit921 1 year ago
Another way to illustrate a pull up/down is to picture a wimpy spring on a light switch. If you have the spring pulling the switch low, you can over-power the switch easily, but when you are not touching it, it will always return to 'off' (or the other way with tying it high).
G0ttoLivefree 1 year ago
@G0ttoLivefree Thanks, that's a good analogy :)
sciguy14 1 year ago
thanks for this tutorial, just got a arduino uno and its different to the ones i've programmed before
mazxbv 1 year ago
have you ever played garrys mod?
if you do get wire mod and tutorials on that please
masongalbraith 1 year ago
hey man you are amazing. Even if i cant understand some things i believe that your vids derve more views!!
LolJordan25 1 year ago
Great video, very concise!!!
manutube8080 1 year ago
what is a pullup and pull down resistor, this i cant understand no matter how many times i read the wiki article on it please simplify
glennlopez 1 year ago
@glennlopez I will explain this topic further in next week's episode. You can think of a a pulldown or pull resistor as setting a "default value for the pin. When the button is unpressed, the I/O is connected to ground through the pulldown resistor, causing the arduino to read a logical "0". The pulldown prevents the voltage level from "floating". When the button is pressed, the I/O pin is connected directly to 5V (with no resistor), so it reads a logic "1".
sciguy14 1 year ago
Hey jeremy, i just got a new computer. How do i set up the internet? Its upstairs so i plugged in a new router. But i cant find my local connection i use for my other computers? Do you know what to do? PM me please!
chapmanvoris 1 year ago
@activate124 I already know that mate, but I would still like to become really good.
WindowsVideoArchive 1 year ago
Nice job explaining this, Jeremy. I'm sure many new comers will find this very helpful!
whisk0r 1 year ago
Can I ask you something? How did you become so good at computers? I read and read all the time about different things about computers to build my knowledge and it's never enough. I want to become a computer technician one day. I can't go to college to learn because they don't have courses on computers here. Any advice or guidance on how I can become better at computers?
Thanks!
WindowsVideoArchive 1 year ago 4
@WindowsVideoArchive You can only get so far by reading. You need to get your hands on actual technology and start messing with it. That's the only way you'll learn it inside and out.
sciguy14 1 year ago 7
@sciguy14 Cheers for the reply mate I'll keep that in mind.
WindowsVideoArchive 1 year ago
@WindowsVideoArchive reading, practising and asking questions :) that's how I get a lot of knowledge about computers.. it took me about 4-6 years but im pretty good at this now ...
TheKamillo666 1 year ago
@WindowsVideoArchive duh he has been genetically altered to be a super nerd sheesh
Crazylogie 1 year ago
@Crazylogie Funny......
WindowsVideoArchive 1 year ago
oh jeremy,i have a question,is the 5v power supply on the uno safe to plug in a toy motor? (knex motor) i,m gonna use a transistor to switch it,so it won't be directly connected to one of the digital pins.
greetings tom
djtowo 1 year ago
@djtowo You should measure the current draw of the motor - USB can only supply so much. I'd recommend hooking up a separate 9V and powering the motor with that (or regulating it to 5V first).
sciguy14 1 year ago
hey dude i bought it!,created my first robot right away!
i,m gonna send you a link
djtowo 1 year ago
@djtowo Great! You can submit it to the contest I'm announcing in my next video!
sciguy14 1 year ago