PathMaker for Scribbler S2
hyperritual
Posts: 11
Greetings,
I wrote a little sketch in Processing that lets you draw a path with your mouse and then output said path to Spin code to upload to the S2 robot, which will then follow the path drawn. Here is how it looks:
Here is the source code with instructions in comments: link
And here is a .zip archive with the sketch + example files: link
The output is just a Spin method you can include with other Spin code from which you call the method. I have another version of the makeFile() function which creates a complete file that can be uploaded to the S2 (along with s2.spin) without having to change anything.
Cheers,
Joshua
I wrote a little sketch in Processing that lets you draw a path with your mouse and then output said path to Spin code to upload to the S2 robot, which will then follow the path drawn. Here is how it looks:
Here is the source code with instructions in comments: link
And here is a .zip archive with the sketch + example files: link
The output is just a Spin method you can include with other Spin code from which you call the method. I have another version of the makeFile() function which creates a complete file that can be uploaded to the S2 (along with s2.spin) without having to change anything.
Cheers,
Joshua
Comments
With some calibration, the PathMaker sketch could be used to plot a course for the S2 around some obstacles. Of course, that would defeat the fun/challenge of AI programming the robot to find its own way, but could be useful where only movement along the path is needed/desired.
I am in the process of trying out this project, but I have hit a roadblock, so to speak.
I am using a later version of Processing (2.0) than what is listed in your instructions/source code, and when I run the script it kicks out an error.
At this line in the code:
String path = selectInput("Select a background image...");
I get this error:
The method selectInput(String, String) in the type PApplet is not applicable for the arguments (String)
Is this a version-compatibility (programming language) problem or something else that I am not seeing/understanding?
Regards,
Courtney Jacobs