Pages: [1]   Go Down
Author Topic: Help Using UltraSonic Sensor with Arduino and Processing  (Read 1017 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basic Overview:
I'm creating a remote control robot using Arduino, Processing and Xbee. The controller is a PS3 controller which interfaces with my laptop through MotionInJoy and Processing (with the ProControll Library & Arduino library to send commands to the micro-controller). The Arduino on the otherhand is an Uno r3 running the "Standard Firmata" to communicate with my laptop.

What I have So Far
I've fully completed coding Processing to receive commands from the PS3 controller and reroute them to the board which in turn controls the Motors and other peripherals.

Problem
I'm trying to add a sonar capability that will be visually displayed onto a window in Processing on my laptop. Without using Processing, i've written a full program that uses my (HC-SR04 UltraSonic Sensor) to get data and convert it to distances in different units. The problem i'm having is moving that code to Processing since I don't have access to the following functions: "delayMicroseconds()" & "pulseIn()". These are basically necessary to operate the UltraSonic sensors. Where Java is only accurate in delaying in Milliseconds and pulseIn() isn't available in the Arduino to Processing library.

I need to get the sensor data to Processing, but don't have enough knowledge regarding how to hack and change the "Standard Firmata" or how to gain access to the necessary functions from Processing.

Thanks for any help.


Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50115
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I need to get the sensor data to Processing, but don't have enough knowledge regarding how to hack and change the "Standard Firmata" or how to gain access to the necessary functions from Processing.
It's time for you to recognize that you've outgrown Firmata.
Logged

Pages: [1]   Go Up
Jump to: