Arduino to processing
4 stars based on
74 reviews
So I have a Sharp IR sensor connected to my Arduino, feeding to my pc the values of its analog input, via the Serial connection. To do this, I'm using the Serial. I want to be able to read these values into processing, but when I use the Serial. You are trying to send 10 bits the adc on your arduino byte to bits arduino robots 10 bit When sending to the serial monitor, the fact that you are not sending 8-bit bytes is sorta taken care of for you.
When you get to processing, those extra 2 bits actually a second byte is screwing everything up. The easiest solution is to byte to bits arduino robots your ADC reading by 4 to make it a byte and then send it. If you want more accuracy, you will need to receive 2 bytes on the processing side high and low and then put them back together into your big number. Just do serial sends from Processing and receive them in Arduino.
Byte to bits arduino robots you see all the examples of this from the arduino website? Our chat is a buzzing-with-life place where our community members join to discuss and foster great conversations. Whether it's about their latest robotics project, questions about electronics, debates about the industry, or just talking between friends. By flare November 14, What am I doing wrong, and how can I get processing to read these values from the IR sensor?
Any help is appreciated. Comment viewing options Flat list - collapsed Flat list - expanded Threaded list - collapsed Threaded list - expanded. Date - newest first Date - oldest first. Select your preferred way to display the comments and click "Save settings" to activate your changes. By ChuckCrunch Mon, By Chris the Carpenter Mon, By flare Tue, Thanks, will give that a go.
The relevant code is: By ChuckCrunch Tue, How do you do the reverse? Send data from Processing to the Arduino, to, say, control a servo with the keyboard? By Chris the Carpenter Tue, By ChuckCrunch Wed, Shout Box Register and login to chat with other members.
You have to be logged in to chat. User login Log in using OpenID: Create new account Request new password. Add Content Your work byte to bits arduino robots progress or a finished robot: Write in your own blog: Show what you are making robots of: Help others with what you have learned: Tip or walk through. Add a news item or cool link: