Quantcast

Adding more than one Pin Value to reportAnalogPin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Adding more than one Pin Value to reportAnalogPin

robyn farah
Hello,

I currently using Firmata with my Arduino and I am struggling to know how to pick up more than one pin at a time. My aim is to read all pins both Analog and Digital when I want as well as to send data to all pins, basically as much freedom as possible.

This is what I have:

a = FirmataDevice.new('/dev/tty.usbmodem1a1231');
a.reportAnalogPin(0, true); //zero is the analog pin taht is being read, e.g. if I change it to 1 it read analog 1
a.analogPinAction_({arg num, val;

        ~bob=[val];
})

~bob.postln;


Thank you
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Adding more than one Pin Value to reportAnalogPin

Nathan Ho
Hi Robyn,

I'm afraid to say your message didn't get through properly. You need to post in the "SuperCollider Users New (Use this!!!!)" subforum and be subscribed to sc-users or sc-users-acl (for non-delivery), otherwise your messages don't get delivered to everyone's inboxes. Terribly sorry, these mailing lists are a mess.

An alternative is to file an issue at the GitHub repo for the SCFirmata quark: https://github.com/blacksound/SCFirmata


Nathan

robyn farah wrote
Hello,

I currently using Firmata with my Arduino and I am struggling to know how to pick up more than one pin at a time. My aim is to read all pins both Analog and Digital when I want as well as to send data to all pins, basically as much freedom as possible.

This is what I have:

a = FirmataDevice.new('/dev/tty.usbmodem1a1231');
a.reportAnalogPin(0, true); //zero is the analog pin taht is being read, e.g. if I change it to 1 it read analog 1
a.analogPinAction_({arg num, val;

        ~bob=[val];
})

~bob.postln;


Thank you
Loading...