FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 

Small framework for testing the unit
MUFF WIGGLER Forum Index -> nw2s  
Author Small framework for testing the unit
To get started with the NW2S::b and Arduino programming in general, I felt I had to shrink down the supporting files to mainly the user interface routines. I did this for a few reasons:
1) I am not a very good programmer and my 'C' programming hasn't evolved into C++ or OOC or anything else introduced in the last two decades. Yes, it's been a while.
2) I found it confusing trying to work through the framework and all of the options it provides.
3) A shortened compile and download never hurts when trying to re-learn programming.

So I did some Frankencoding and ended up with the support files included in the sketch I just introduced in this forum:
NW2S::b Ghost Drum Sketch

Most of the UI routines are consolidated in the bAllIO.cpp file and include the following:

void bLED(int count); - sets the beat LED
- count = 0-15
void aLED(int output, word brightness); - controls the analog output LEDs
- output = 0-15 for analog output LEDs #1 - 16
- brightness = 0-4095 to control the LED brightness
void aLED_On(int output); - turns on an analog output LED
- output = 0-15 for outputs #1 - 16
void aLED_Off(int output); - turns Off an analog output LED
- output = 0-15 for outputs #1 - 16
void dOut(int output, bool state); - controls a digital output
- output = 0-15 for outputs #1 - 16
- state = HIGH or LOW for On or Off
void dOut_On(int output); - turns a digital output On
- output = 0-15 for outputs #1 - 16
void dOut_Off(int output); - turns a digital output Off
- output = 0-15 for outputs #1 - 16
int aIn(int input); - returns the value of an analog input (0-4095)
- input = 0-11 for analog inputs 1-12 respectively
bool dIn(int input); - returns the state of the digital inputs (LOW or HIGH)
- input = 0-7 for digital inputs 1-8 respectively

Note that I have not looked at the actual analog outputs yet (just the LEDs).
I fully intend to investigate the provided framework and am excited to provide sketches in the jSON format when that part of the framework is completed. Again, use my files if you wish to get started quickly, but by all means use and contribute to the overall framework if you are able as that would provide the greatest benefit to the community at large.
Nice. Thanks. Good to see someone synthesizing my initial work into something of their own. There's a lot to take in, so it helps to see how other folk will be using it.

The JSON code is making progress, and my coding is way ahead of my documentation. Should have almost everything that I've written so far implemented in JSON by the weekend, and then I'll get back to writing more devices... Wavetable LFO and a fully streaming sample player being next on my list. Will be posting links here when it's all documented.

MUFF WIGGLER Forum Index -> nw2s  
Page 1 of 1
Powered by phpBB © phpBB Group