alvieboy

Simplifying code

Recommended Posts

You think this approach below somehow might make things easier for programmers ?

#include <Papilio.h>

Papilio::ADC8_Wing myadc;

void setup()
{
    Serial.begin(115200);
    myadc.begin( Papilio::Wing_A_Low );
}

uint16_t sample()
{
    return myadc.sample(0); // Channel 0
}

Idea is to have all GF Wings (and other contributed wings) easier to attach in software.

Álvaro

Share this post


Link to post
Share on other sites

I think this would be really great to do, we can already move pins in the AVR8 and the ZPUino but to make them into objects where you can define the pins and then use the objects method's and properties would be really nice!

One key thing for this would be the documentation, I've started a series of Introductory topics to document and the one for this week is supposed to be how to move pins in a sketch. I was also planning to do an Intro article for each of the existing Wings, might be a good idea to try and define objects, intro article, and reference documentation for each Wing. I was going to do a new weekly topic, maybe we can work together and do a bi-weekly expanded effort where it is not just an intro article but all of the above?

Jack.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now