Opened 13 years ago
Closed 10 years ago
#1949 closed enhancement (wontfix)
Turtle Art to read/write USB
Reported by: | tonyforster | Owned by: | walter |
---|---|---|---|
Priority: | Low | Milestone: | Unspecified |
Component: | Turtleart | Version: | Unspecified |
Severity: | Unspecified | Keywords: | easy-hack |
Cc: | Distribution/OS: | Unspecified | |
Bug Status: | Unconfirmed |
Description
Another one for the wish list. It would be really cool if TA could interface via USB to devices like accelerometers and weather stations. Possibly best implemented as sample python code for the programmable block.
Attachments (4)
Change History (13)
comment:1 Changed 13 years ago by walter
comment:2 Changed 13 years ago by tonyforster
See volumesmanager.py and HAL for possible ideas? (that's where USB gets mounted in journal?)
comment:3 Changed 12 years ago by tonyforster
Three files attached, the python code reads and writes to a serial device on the USB
Tested with an Arduino running an echo program.
Need to copy the serial directory to turtleart.activity
Standard install of Pyserial fails because Sugar's Python does not have the developer tools
python setup.py install
unable to open /usr/lib/python2.6/config/Makefile (No such file or directory)
I copied the serial directory from TortugArdu http://www.box.net/shared/bsf8tmj6al
should work wherever there is a FTDI FT232R USB to serial converter IC
more ideas at
http://littlebirdelectronics.com/products/breakout-board-for-ft232rl-usb-to-serial
http://www.chinwah-engineering.com/
comment:4 Changed 12 years ago by RafaelOrtiz
One suggestion is to have or abstract the usb related code in TB's core, in order to make able for the plugins to use that, but not necessarily to have it in the plugin.
comment:5 Changed 12 years ago by walter
Sorry to have taken so long with this. Will be part of v117 release.
http://git.sugarlabs.org/turtleart/mainline/commit/0996701c39695e24fbb4992471ba5298f52a4fe6
comment:6 Changed 12 years ago by walter
- Resolution set to fixed
- Status changed from new to closed
Fixed in v117
comment:7 Changed 12 years ago by tonyforster
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks
Tested OK with the serial adaptor and the Arduino
It would be good if we could include in the comments, simple instructions on how to install the serial library. That's a bit beyond my skills.
Or as Rafael suggests, include the library code in TA
Still, its low priority.
comment:8 Changed 12 years ago by walter
- Keywords easy-hack added
comment:9 Changed 10 years ago by walter
- Resolution set to wontfix
- Status changed from reopened to closed
I think the serial package is installed by default these days.
The Arduino fork is a good example of this. But yes, in general, I think it is a matter of putting some sample code into tamyblock.py. We could accumulate a library of examples for popular devices.