Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 0
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
New to this Portal?
Click on Join Now to Sign Up
Join Now
Help
Feedback
Sign In
Processing Forum
Recent Topics
All Forums
Search All
Tags
Author
Advanced Search
Search
New Topic
Screen name:
jdawgaz
jdawgaz's Profile
3
Posts
4
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
serialEvent not working in osx
[0Replies]
15-Jun-2012 07:42 AM
Forum:
Integration and Hardware
using Tom Igoe's serial event processing code:
and some arduino code that works.
http://www.processing.org/reference/libraries/serial/serialEvent_.html
I have verified that this works just fine under windows.
I have yet to verify if it works under linux.
It does NOT work in osx.
OSX hack:
run the following python script FIRST before processing sketch:
#!/usr/bin/env python
import serial
from time import sleep
s = serial.Serial(port='/dev/tty.usbmodem411', baudrate=9600)
while (1):
sleep(1)
s.write('\n')
l = s.readline().strip()
print l
This will "prime the pump" of processing so to speak.
Obviously, the serialEvent has NOT been tested in osx.
I will verify later today, if the same situation applies to linux
using Serial to communicate with arduino
[1Reply]
14-Jun-2012 06:05 AM
Forum:
Core Library Questions
can someone look at this thread? and clue me in on this?
crossposted thread
does someone have working code in Processing for Serial processing from Arduino ( a line at a time )
[3Replies]
13-Jun-2012 08:32 AM
Forum:
Integration and Hardware
I am fairly new to Processing, so pardon the newbie question
I have an arduino program that prints out a csv string val1,val2,val3,val4\n:
int firstSensor = 0;
int secondSensor = 0;
int reset = 0;
int serve = 0;
int inByte = 0;
void setup()
{
// start serial port at 9600 bps:
Serial.begin(9600);
randomSeed(10);
//establishContact(); // send a byte to establish contact until Processing responds
}
void loop()
{
// if we get a valid byte, read analog ins:
if (Serial.available() > 0) {
inByte = Serial.read();
firstSensor = random(385);
secondSensor = random(385);
reset = random(0,2);
serve = random(0,2);
if (reset == 1) {
serve = 0;
}
Serial.print(firstSensor);
Serial.print(',');
Serial.print(secondSensor);
Serial.print(',');
Serial.print(reset);
Serial.print(',');
Serial.println(serve);
}
}
I can read the data in python:
#!/usr/bin/env python
import serial
from time import sleep
s = serial.Serial(port='/dev/tty.usbmodem411', baudrate=9600)
while (1):
sleep(1)
s.write('\n')
l = s.readline().strip()
print l
but I can't get this to work in Processing:
I am trying to use serialEvent and bufferUntil, but no matter what I try, absolutely nothing comes over.
Does anyone have any working code that would take the output of the arduino in processing?
thanks,
Jerry
«Prev
Next »
Moderate user : jdawgaz
Forum