#2800: Analog Input support for eToys ----------------------------+----------------------------------------------- Reporter: arjs | Owner: etoys Type: enhancement | Status: new Priority: normal | Milestone: Untriaged Component: etoys-activity | Version: Keywords: | Verified: 0 ----------------------------+----------------------------------------------- It would be very nice to have support for Analog Input in eToys.
You could use code ive developed as part of Measure activity -
See http://dev.laptop.org/git?p=projects/measure;a=blob_plain;f=audioGrab.py;hb=... (getting samples)
and http://dev.laptop.org/git?p=projects/measure;a=blob_plain;f=buttons.py;hb=HE... (toggling between AC/DC modes and controlling bias voltage etc.)
Or I could easily provide you with a class that you could use. I could make functions in that class that could simply return to you the required values. For example there could be a function that you could call to return avg voltage or rms voltage, select between ac/dc modes, set bias_on, set bias_off.....
Let me know if I can help in any way.
thanks, Arjun
#2800: Analog Input support for eToys -----------------------------+---------------------------------------------- Reporter: arjs | Owner: etoys Type: enhancement | Status: new Priority: normal | Milestone: First Deployment Component: etoys-activity | Version: Resolution: | Keywords: Verified: 0 | -----------------------------+---------------------------------------------- Changes (by jg):
* milestone: Untriaged => First Deployment
#2800: Analog Input support for eToys -----------------------------+---------------------------------------------- Reporter: arjs | Owner: etoys Type: enhancement | Status: new Priority: normal | Milestone: First Deployment Component: etoys-activity | Version: Resolution: | Keywords: Verified: 0 | -----------------------------+---------------------------------------------- Comment (by Kazuhiro Abe):
Hello, Arjun
I'm very interested in your work. If you provide these functions as primitive methods of Smalltalk, I will be able to wrap them with Etoys phrase tiles. These may resemble tiles of World-Stethoscope. Kids can play with real phenomena by them.
Thank you. Kazuhiro Abe
#2800: Analog Input support for eToys -----------------------------+---------------------------------------------- Reporter: arjs | Owner: etoys Type: enhancement | Status: new Priority: normal | Milestone: First Deployment Component: etoys-activity | Version: Resolution: | Keywords: Verified: 0 | -----------------------------+---------------------------------------------- Comment (by ohshima):
Hi, Arjun,
I'll help you to make these Squeak primitives. It appears that you use os.system() and amixer to talk to the interface. However, we would like to have a minimal set of C functions to do the equivalent. Then, Squeak can use these C functions easily. We will need to "start" and "stop", and get the current value. The current value probably should be reprented as an integer whose range is 0 to 5000 (or such). Do you think it is easy to write these functions?
etoys-dev@lists.squeakfoundation.org