Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
mmiri80
mmiri80's Profile
1
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
Serial communication
[6 Replies]
11-Nov-2012 03:16 AM
Forum:
Core Library Questions
Hello everyody. I'm trying to communicate my serial an integer DTIME (read from dtime.txt) to my Arduino.
I've no error message, but this still doesn't work! Somebody help me please..
Here's the sketch:
1. import processing.serial.*;
2. Serial myPort;
3. void setup () {
4.
5. String portName = Serial.list()[0];
6. myPort = new Serial(this, portName, 9600);
7. }
8. void FileToSerial() {
9. String [] strLines = loadStrings("dtime.txt");
10. for (int i=0; i<strLines.length; i++) {
11. int DTIME = int (strLines[i]);
12. myPort.write (DTIME);
13. }
14. }
Thank you so much,
Mario.
«Prev
Next »
Moderate user : mmiri80
Forum