Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended Configuration Proposal #39

Closed
soundanalogous opened this issue Feb 20, 2013 · 4 comments
Closed

Extended Configuration Proposal #39

soundanalogous opened this issue Feb 20, 2013 · 4 comments
Labels

Comments

@soundanalogous
Copy link
Member

Copying this over from firmata.org.

Extended Configuration Proposal

for special configuration not covered in pinmode-specific messages

/* set analogReference request
 * 0  START_SYSEX (0xF0)
 * 1  CONFIG_EXT command (0x7C)
 * 2  ANALOG_REF command (0x00)
 * 3  analog reference source (0-4, 0=DEFAULT, 1=INTERNAL, 2=INTERNAL1V1, 3=INTERNAL2V56, 4=EXTERNAL
 *    Values supported are device-specific. 
 *    See http://arduino.cc/en/Reference/AnalogReference and Arduino.h for details)
 */
/* set analogReadResolution request
 * 0  START_SYSEX (0xF0)
 * 1  CONFIG_EXT      command (0x7C)
 * 2  ANALOG_READ_RES command (0x01)
 * 3  analog read resolution (1-32, see http://arduino.cc/en/Reference/AnalogReadResolution for details)
 */
/* set analogWriteResolution request
 * 0  START_SYSEX (0xF0)
 * 1  CONFIG_EXT       command (0x7C)
 * 2  ANALOG_WRITE_RES command (0x02)
 * 3  analog write resolution (1-32, see http://arduino.cc/en/Reference/AnalogWriteResolution for details)
 */
@soundanalogous
Copy link
Member Author

The first of these 3 applies to any board. The 2nd two are Arduino Due-specific for now, but will likely apply to additional boards in the near future.

@ntruchsess
Copy link
Member

That was me writing up this proposal. See my pull-request #40. Since the boards support different sets of values I used ifdefs in the code to enable the features that actually work. Not having the board I didn't have a chance to test the DUE stuff though...

@soundanalogous
Copy link
Member Author

I've submitted a new pull request for this. However it's not as straight forward as I initially anticipated due to differences in how AVR and SAM boards handle these methods.

#143

@soundanalogous soundanalogous removed this from the 2.4 milestone May 20, 2015
@shahanHasan
Copy link

How do i use them with python and pyfirmata to change analog reference to external and pass the reference voltage to analog read ? Any code snippets would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants