An easier way to have Arduino interact with Processing is actually using a library call "Firmata". Firmata allows you to not only take signal from Arduino to Processing, but also the other way around -- from Processing to Arduino. So one of the many cool things you can do is to use your mouse (Processing can recognize the movement of mouse) to control a servo hooked up to Arduino.
I have been stuck on the multiple invalid glitch for a week.
I’ve tried both combinations “(Serial.flush & while(Serial.available()>0) Serial.read();” and copied and pasted the whole code right from your pde file but I still get repeats.
I can’t move forward till I understand and correct this problem.
Could it be that Arduino 1.0 is playing well on my Duemilanove?
Hi I done the second project of serial communication but the screen color does not change. There is a message on processing 1.5.1 (last version on line) :
WARNING: RXTX Version mismatch Jar version= RXTX-2.2pre1 native lib Version = RXTX-2.2pre2
hey sup just have a question when i press verify button on the computer it get an error that says
'else' without a previous 'if' any idea????? i try by replacing the 'else if' and 'else' statement by using just the 'if' statement and it didnt showed any error but the LED turns on with any button i press and the arduino sends back "Led is On Invalid!" at the same time with any button the number 0 works good to turn the LED off with the right message.
Awesome video. This is exactly what I've been looking for! In the first half of the video you use numbers to send commands to the arduino via serial monitor. how do i send more than one digit, for example "10" or send a command "fan on"? Before i saw your video i was only wanting to send a few commands but now that i have a better understanding I want to do more and expand on my original idea.
What would the code be for writing an LED's brightness with Serial Communication? So I would want to be able to type any number from 1-255 and have that number correspond with its brightness. I know I could probably right seperate lines for each number, but that would take forever. So bassicly how do you write 1 "through" 255 and have it turn on the LED at the brightness of the typed number.
Hi, every time the input updates the draw() is called, and serialEvent() called after that .. right ? but that raises a question.. how come the serialEvent() is called after draw .. Please explain . thx .
Thank you very much for these tutorials, they've taught me a lot.
If I'm plugging an RFID reader into the rx pin on the uno, when programming would I use serial differently to ensure it communicates with the rx pin and not with the computer??
Hey Jeremy, great video, was very helpful in my arduino project. I was wondering if you have any idea how to use processing to make the pc think a button on its keyboard or mouse was clicked. I've already used a tilt sensor to move the cursor
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 stay on and stay 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
Hi, Is it possible to send data from DS18b20 temp sensor hooked up to arduino via serial to PC and gather that data in some form that could be understand by excel?
Thank you so much for making these tutorials, they are really helpful for beginners like me. Can you please tell me how to receive a two digit number through serial.read()? I can only receive a single int or char.
hey man, i am having trouble with the idea with interfacing other hardwhere with my arduino, like ic's and stuff, because i have a big lcd screen that uses 4 HD61104 ic's could you please help me thanks
Thank you very much for uploading these videos, its very generous of you, you have taught me how to use an arduino!
I have a program in which I send a number, 0-255 to the arduino, and it simply sets an led's brightness to the number, and sends me a message to tell me what the brightness is.
However, if I send it '255' it sends me three seperate messages, saying that the brightness is 2, then 5, then 5. I have tried lots of solutions, but none work for me! Please could you help me??
In what free time I have been able to spend learning about/experimenting with Arduino your videos seem to be the most informative/detailed from the hardware & the software side.
Great Job! Thank You for expanding everyone's (including my own) knowledge!
hy brother!! plz tell me what will happen if i send "1111784769" to arduino..??????..will it be treated as a garbage value?? or will the Led get ON ????????
I have a problem in communication (arduino -->> C#) I want to send analog read to coputer and refresh this value evry secound / half secound. With serial monitor works fine, but C# program freezes after 5-10 refreshes. Can somebody help me please?
Great tutorial, but how would i use a single keyboard key to manipulate something in arduino. For example turning a relay on while enter is held down and turning the relay off when enter is released. Can this be done with anduino programming environment only or would processing also have to be used.
@bricelikesrice21 IF you wanted to do it without a computer, you best bet might be to open up the keyboard and hookup a wire for individual keys - Instead of using the arduino to work as a USB host.
@GreeblyChicken You would use the same process I did in this video. You can comma seperate the values, and remove the commas and parse the data on the computer.
@sciguy14 I found it easier to send a letter, then the value, then use a case switch argument to read it to a different variable according to the letter sent.
Hey, thanks for the tutorial, it was very usefull. However, I am using 2 flex sensors and I would like to read the changing values into processing. Is there an example anywhere of what code i need to write into processing? I have been able to successfully get it working in arduino I just dont know how to get analogue values into processing. ANy help would be greatly apreciated :) thanks in advance
There's another way of solving the data type issue at 5:05 . You could simply use the byte conversion when reading from you serial buffer.
//Read the input
int val = byte(Serial.read());
If Arduino doesn't get it, since it's an integer, you can always convert it, which would look like this: (I'm not sure if this is necessary. Haven't tested it)
//Read the input
int val = int(byte(Serial.read()));
This way arduino gets the bytes as characters from the ASCII table.
hey buddy, great videos! I've recently got into Arduino's and you've helped bring to light some of the darker areas, such as serial communication. So i'd like to thank you!! However, there are still many concepts with serial communication that I'm having a little bit of trouble. I'm used to C++ so maybe that's where i'm having trouble, but if you know of any books that might be good for me to read to help become more fluent with Serial-COM and the Arduino, I'd much appreciate it. -Joe
@ThePurpleFish12 "=" is for assignment. For example, if you want the variable x to equate to 5, you'd say x=5; "==" is for checking if two things are equal. If you want to perform a certain action when x is equal to 5, you would check like this: "if (x ==5) {do something;}"
@raghunitin Processing isa good language for "doing stuff" with serial inputs to the computer. You can alternatively use other language that can talk via serial (almost any), or if you are writing a program that doesn't necessitate it, just don't use it.
@thekiller0673 haha, So far, I have up through episode 10 planned out. episode 10 will probably be the last yellow level, and then I will move to red after that. But I plan to take a break after episode 10 for a little while, since the spring semester is in full swing now. Not sure of the exact timeline yet.
I don't own an arduino. Does the window with the Java icon automatically pop up when you use Serial.begin(9600); ?
DethScarred 2 days ago in playlist Tutorial Series for Arduino
hey jermy do u know any code that reads serial and see it from 1 to 180 that automatically turn a servo correspondingly ????
francisroan 4 days ago in playlist Tutorial Series for Arduino
An easier way to have Arduino interact with Processing is actually using a library call "Firmata". Firmata allows you to not only take signal from Arduino to Processing, but also the other way around -- from Processing to Arduino. So one of the many cool things you can do is to use your mouse (Processing can recognize the movement of mouse) to control a servo hooked up to Arduino.
shearbanding 4 days ago in playlist Tutorial Series for Arduino
@shearbanding Here is a brief intro:
"arduino.cc/playground/Interfacing/Processing"
shearbanding 4 days ago in playlist Tutorial Series for Arduino
muchias gracias or w/e =)
shebotnov 5 days ago
Jeremy,
I have been stuck on the multiple invalid glitch for a week.
I’ve tried both combinations “(Serial.flush & while(Serial.available()>0) Serial.read();” and copied and pasted the whole code right from your pde file but I still get repeats.
I can’t move forward till I understand and correct this problem.
Could it be that Arduino 1.0 is playing well on my Duemilanove?
Thanks for your help.
Jim G.
capnjgtube 1 week ago in playlist Tutorial Series for Arduino
This is genious. You, my dear sir, is a genious.
hablahei1 2 weeks ago
More advanced control of your projects: marginallyclever daut com/2011/10/controlling-your-arduino-through-the-serial-monitor/
aggrav8d 2 weeks ago
Hi I done the second project of serial communication but the screen color does not change. There is a message on processing 1.5.1 (last version on line) :
WARNING: RXTX Version mismatch Jar version= RXTX-2.2pre1 native lib Version = RXTX-2.2pre2
Thanks
Mrwaldimar 3 weeks ago
Is Processing object oriented? It almost seems like it is.
enticed2zeitgeist 1 month ago in playlist Tutorial Series for Arduino
Is there a way you can post some videos just about the programming?
mrdove500 1 month ago in playlist More videos from sciguy14
@sciguy14
not to sound like a perfectionist, but USB isn't RX/TX based, it is DATA+/- based
DATA+ != DATA-
MrHack4never 1 month ago in playlist Tutorial Series for Arduino
hey sup just have a question when i press verify button on the computer it get an error that says
'else' without a previous 'if' any idea????? i try by replacing the 'else if' and 'else' statement by using just the 'if' statement and it didnt showed any error but the LED turns on with any button i press and the arduino sends back "Led is On Invalid!" at the same time with any button the number 0 works good to turn the LED off with the right message.
any ideas?? thanks for your time!!
UDK11 1 month ago
Is there a way to read serial values from the COM3 port (or which ever port) in say Codeblocks (c++)? Rather than Processing.
amorag59 1 month ago in playlist Arduino Uno tutorials
@amorag59 nvm figured it out, search serial-win.pdf in google
amorag59 1 month ago in playlist Tutorial Series for Arduino
Awesome video. This is exactly what I've been looking for! In the first half of the video you use numbers to send commands to the arduino via serial monitor. how do i send more than one digit, for example "10" or send a command "fan on"? Before i saw your video i was only wanting to send a few commands but now that i have a better understanding I want to do more and expand on my original idea.
fabsaiz 1 month ago
What would the code be for writing an LED's brightness with Serial Communication? So I would want to be able to type any number from 1-255 and have that number correspond with its brightness. I know I could probably right seperate lines for each number, but that would take forever. So bassicly how do you write 1 "through" 255 and have it turn on the LED at the brightness of the typed number.
TheForgaven 1 month ago
Serial.flush doesnt seem to work...? anyone have any idea? Thanks
2BeN3 2 months ago 2
I found this on the Arduino site...
Waits for the transmission of outgoing serial data to complete. (Prior to Arduino 1.0, this instead removed any buffered incoming serial data.)
Has something changed since this video was posted?
2BeN3 2 months ago
@2BeN3 I am having the same problem with the Serial.flush(); command. Anyone know why?
tpthatsme 2 months ago
@2BeN3 See video description.
sciguy14 2 months ago
@sciguy14 Thanks a lot. Your videos have been really helpful btw!
2BeN3 1 month ago
@sciguy14. Start this video, and turn on audio transcribing, then read the first few sentences of what it transcribes. HILARIOUS.
lazerusmfh 4 weeks ago
@2BeN3 Serial.flush() in Arduino 1.0 has changed. the new syntax is (Serial.available()[GREATER-THAN]0)
{
Serial.read();
}
Glad I could help
nrsmac 3 weeks ago
very good videos, this is helpful stuff for sure. good audio, that's important.
steveoondyou 2 months ago
Can you only use tx and rx pins
powerwingman 2 months ago
Hi, every time the input updates the draw() is called, and serialEvent() called after that .. right ? but that raises a question.. how come the serialEvent() is called after draw .. Please explain . thx .
555262 3 months ago
@555262 The serialEvent() is called whenever serial data is collected. It's kind of like an interrupt
sciguy14 2 months ago
can´t you just tell it it´s a char?
MrJa1l 3 months ago in playlist Tutorial Series for Arduino
This has been flagged as spam show
Does anyone have VB.NET code to read data input from a USB weight scale?
I have a scale that connects to my PC via serial. When an item is placed on the
scale, the weight is displayed in a textbox .
I am trying to emulate this in my own custom application using the same scale.
bhadz1723 3 months ago
can I press a button on the arduino to get a sound (note) from the computer
(I'm trying to make a laser harp)
013dirtdiver 3 months ago
This has been flagged as spam show
How can I send chars like 100 to arduino and get 100 back?
If I do it like this I get 1, 0 and the last 0 back separetly!
So how can I get arduino to understand hundreds and tens?
>>same question for me jeremy. can you please do a tutorial for this, it would be extremely helpful tnx! love your videos btw! keep it up!
Rk17 3 months ago
Thank you very much for these tutorials, they've taught me a lot.
If I'm plugging an RFID reader into the rx pin on the uno, when programming would I use serial differently to ensure it communicates with the rx pin and not with the computer??
tomd966 3 months ago
@tomd966 Yes, you'll need to use a jumper or switch so the arduino is listening to the computer
sciguy14 2 months ago
Hey Jeremy, great video, was very helpful in my arduino project. I was wondering if you have any idea how to use processing to make the pc think a button on its keyboard or mouse was clicked. I've already used a tilt sensor to move the cursor
FergusB3 3 months ago
great, comprehensive instructions, clear instruction and great exlpaination of the parts of the programming. awesome work.
123456789robbie 3 months ago
Comment removed
jkoppp267 3 months ago
How can I send chars like 100 to arduino and get 100 back?
If I do it like this I get 1, 0 and the last 0 back separetly!
So how can I get arduino to understand hundreds and tens?
hugosdominoes 3 months ago
@hugosdominoes If I'm not mistaken, you need to your a char array.
FutureInventions 3 months ago
where can I find a reference for the processing library?
agentEE7 3 months ago
This has been flagged as spam show
4 people programmed his arduino wrongly
Andy0n7 4 months ago
Comment removed
Andy0n7 4 months ago
Comment removed
Andy0n7 4 months ago
This has been flagged as spam show
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 stay on and stay 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
This has been flagged as spam show
Dont make claims that you cant make
microchoc 4 months ago
Nicely done.
ChrisGZArt 4 months ago
Those are called single quotes, not single brackets
MrFlankster 4 months ago
This is the first video that I've seen from you.
Awesome! Absolutely awesome!
Looks like I have alot of video to watch at work!
I've been looking around the web for some type of tutorial, and dude, You need to be making some cash doing this!
I've just been tinkering thus far, and I'm tired of doing that.
I'm looking to expand my knowledge.
Any pointers of heads up that you can give would be kick butt!
One other question.
If I paid you, could you set up a program for me?
AzBirdDog 4 months ago
Hi, Is it possible to send data from DS18b20 temp sensor hooked up to arduino via serial to PC and gather that data in some form that could be understand by excel?
kildas 4 months ago
Thank you so much for making these tutorials, they are really helpful for beginners like me. Can you please tell me how to receive a two digit number through serial.read()? I can only receive a single int or char.
shah5000 5 months ago
hey man, i am having trouble with the idea with interfacing other hardwhere with my arduino, like ic's and stuff, because i have a big lcd screen that uses 4 HD61104 ic's could you please help me thanks
dfgfdghgg 5 months ago
Thank you very much for uploading these videos, its very generous of you, you have taught me how to use an arduino!
I have a program in which I send a number, 0-255 to the arduino, and it simply sets an led's brightness to the number, and sends me a message to tell me what the brightness is.
However, if I send it '255' it sends me three seperate messages, saying that the brightness is 2, then 5, then 5. I have tried lots of solutions, but none work for me! Please could you help me??
tomd966 5 months ago
In what free time I have been able to spend learning about/experimenting with Arduino your videos seem to be the most informative/detailed from the hardware & the software side.
Great Job! Thank You for expanding everyone's (including my own) knowledge!
☺
TheTubejunky 6 months ago 5
Comment removed
mehdiardavan 6 months ago
hy brother!! plz tell me what will happen if i send "1111784769" to arduino..??????..will it be treated as a garbage value?? or will the Led get ON ????????
u shown at 11:00 th min..
RockingWorlification 6 months ago
@RockingWorlification Why don't you try it? It should look at just the first number and turn on.
sciguy14 6 months ago
@sciguy14 ok i will bring arduino and try ........while thnx..!!
RockingWorlification 6 months ago
I have a problem in communication (arduino -->> C#) I want to send analog read to coputer and refresh this value evry secound / half secound. With serial monitor works fine, but C# program freezes after 5-10 refreshes. Can somebody help me please?
martinopresnik 6 months ago
Look at 1:22 his eyes are almost exactly in the loops of the arduino logo...
zazw3 7 months ago 7
@zazw3 wow cool!
sciguy14 7 months ago
Great tutorial, but how would i use a single keyboard key to manipulate something in arduino. For example turning a relay on while enter is held down and turning the relay off when enter is released. Can this be done with anduino programming environment only or would processing also have to be used.
bricelikesrice21 7 months ago
@bricelikesrice21 IF you wanted to do it without a computer, you best bet might be to open up the keyboard and hookup a wire for individual keys - Instead of using the arduino to work as a USB host.
sciguy14 7 months ago
Can you do a tutorial on sending multiple values over serial, as I can't get that to work.
GreeblyChicken 7 months ago
@GreeblyChicken You would use the same process I did in this video. You can comma seperate the values, and remove the commas and parse the data on the computer.
sciguy14 7 months ago
@sciguy14 I found it easier to send a letter, then the value, then use a case switch argument to read it to a different variable according to the letter sent.
GreeblyChicken 7 months ago
@GreeblyChicken i had the same problem, you can take a look at my sketch, its on pastebin:
pastebin{dot]com(slash)8t0f1zYc
dumle29 7 months ago
@dumle29 try sending it some data via the serial monitor, eg. S132 or F234 it also tells you if you´ve entered invalid data.
dumle29 7 months ago
hey man, There is a cool finger print module, Can u make a tutorial on how to interface sm630 with the arduino?
punkdane 7 months ago
how do you mix both programs?
pinochska 8 months ago
@pinochska What do you mean? They are separate.
sciguy14 7 months ago
@sciguy14 yeah sorrry i wrote the comment and after i thought about it for a while i got it... awesome tuts by the way
pinochska 7 months ago
Hey, thanks for the tutorial, it was very usefull. However, I am using 2 flex sensors and I would like to read the changing values into processing. Is there an example anywhere of what code i need to write into processing? I have been able to successfully get it working in arduino I just dont know how to get analogue values into processing. ANy help would be greatly apreciated :) thanks in advance
npj5578 9 months ago
@npj5578 Just send them as a serial string like I did in this episode. Each time around the loop, read the value, then send it to the computer.
sciguy14 8 months ago
There's another way of solving the data type issue at 5:05 . You could simply use the byte conversion when reading from you serial buffer.
//Read the input
int val = byte(Serial.read());
If Arduino doesn't get it, since it's an integer, you can always convert it, which would look like this: (I'm not sure if this is necessary. Haven't tested it)
//Read the input
int val = int(byte(Serial.read()));
This way arduino gets the bytes as characters from the ASCII table.
halfeld 9 months ago
Awesome tutorials!
The serial example is great, very easy to understand.
Thanks
hoogletm 9 months ago
Ffff!!!
Gotta love you dude!!
I'm soooooo learning A LOT from you than reading some shiz on arduino website XD
*watches next episode*
VigilianceAurelious 10 months ago
hey buddy, great videos! I've recently got into Arduino's and you've helped bring to light some of the darker areas, such as serial communication. So i'd like to thank you!! However, there are still many concepts with serial communication that I'm having a little bit of trouble. I'm used to C++ so maybe that's where i'm having trouble, but if you know of any books that might be good for me to read to help become more fluent with Serial-COM and the Arduino, I'd much appreciate it. -Joe
joebro391 10 months ago
Sir is it possible for the Arduino to received serial data from an IC, and transmit it to a computer GUI?? maybe a visual basic based GUI?
Thanks...
rvnclw15 11 months ago
@rvnclw15 I don't see why not. YOu'll need a model with multiple UARTS if you want to do this simultaneously.
sciguy14 11 months ago
@adynizPreviews You can change how often you send data by changing the delay time.
sciguy14 11 months ago
I'm still not sure what the difference is between "=" and "==".
I don't have my arduino yet, so i'm still a little confused.
ThePurpleFish12 11 months ago
@ThePurpleFish12 "=" is for assignment. For example, if you want the variable x to equate to 5, you'd say x=5; "==" is for checking if two things are equal. If you want to perform a certain action when x is equal to 5, you would check like this: "if (x ==5) {do something;}"
sciguy14 11 months ago
@sciguy14 so, '=' is for assigning a variable or pin, while '==' is for comparison?
in other words, '=' is a statement (X HAS TO BE EQUAL TO 5) and '==' is a question (IS X EQUAL TO 5?).
Thanks for clarifying, and by the way... love the arduino videos, are you still doing them/plan to do more?
ThePurpleFish12 11 months ago
@ThePurpleFish12 Yes, I have plans to do some more.
sciguy14 11 months ago
@sciguy14 awesome.
ThePurpleFish12 11 months ago
@ThePurpleFish12 is google closed?
shebotnov 11 months ago
@shebotnov lol. no....
I just wanted him to explain it... Most of the time People do a better job of explaining than Google.
ThePurpleFish12 11 months ago
@ThePurpleFish12
yes but there are questions u can look up on google easely.
shebotnov 11 months ago
your tutorials are great because they explain exactly the things i need to solve my problems :)
metalcore13 1 year ago
shorten the vid
francisroan 1 year ago
@francisroan The video is intentionally very detailed.
sciguy14 1 year ago
@sciguy14 keep them the same length, its more helpful :)
Bindlz 1 year ago
I really enjoy the programming end of it. I'd really like to see the hardware end as well...But I know you have life so yeah...
LauxHawk 1 year ago
on 6:15 I can also use "" instead of ' ' no?
manutube8080 1 year ago
@manutube8080 Single quotes are used for characters, double quotes for strings.
sciguy14 1 year ago
@sciguy14 ok thanks
manutube8080 1 year ago
Comment removed
raghunitin 1 year ago
Hey, amazing upload jeremy... Great work as always......
But, I can't understand the processing part alone because I'm new to that language...... Is it that much important to learn?
raghunitin 1 year ago
@raghunitin Processing isa good language for "doing stuff" with serial inputs to the computer. You can alternatively use other language that can talk via serial (almost any), or if you are writing a program that doesn't necessitate it, just don't use it.
sciguy14 1 year ago
way to go SENSEI
thepimping666 1 year ago
I really like the quality of your videos. I got my Arduino last week, just waiting for a usb cable then I will start to program it, I can't wait!
HampusSandberg 1 year ago
lol he really is nerdy motherfkr
nepalihercules 1 year ago
when is it geting to top red led on the difucolty. and keep it up
thekiller0673 1 year ago
@thekiller0673 There is still much to learn before we get to the red level, young grasshopper.
sciguy14 1 year ago 13
@sciguy14 yes i know but how long sensei
thekiller0673 1 year ago
@thekiller0673 haha, So far, I have up through episode 10 planned out. episode 10 will probably be the last yellow level, and then I will move to red after that. But I plan to take a break after episode 10 for a little while, since the spring semester is in full swing now. Not sure of the exact timeline yet.
sciguy14 1 year ago
@sciguy14 ok and keep it up i love thes vids and tell you brother to make more vids
thekiller0673 1 year ago
Ace, really good stuff, thanks again guy.
Thom in Scotland.
fuelban 1 year ago
20 mins are too short !!!
I want more of this tutorials....your awesome !!!
sigi199191 1 year ago
Mooorrreeeeee!!!! dont stop making these :3 cant wait for the complex stuff like wireless xbee and RF transmitter / receiver
RavenRof 1 year ago
@RavenRof episode 9 ;)
sciguy14 1 year ago
@sciguy14 so that means we are getting at least 3 more episodes. all hail sciguy14! ;)
RavenRof 1 year ago
@RavenRof Spoiler alert: You're gonna get at least 4 more ;)
sciguy14 1 year ago 5
Good stuff Jeremy!
whisk0r 1 year ago
did you end up put this on that site
hyper080 1 year ago
@hyper080 I don't like the way they let you submit video based tutorials. I'm still messing around with it.
sciguy14 1 year ago