Saturday, 7 April 2018

bASTL - Grandpa expander - sampler -spa

Some additional pics to help building the expander for the Bastl Grandpa sampler module.
This is a great little sampler in Euro format.
The official notes are here:
http://www.bastl-instruments.com/modular/grandpa/spa/









Very very nice.

-----------------------------------------------------------------------------------------------
For more Euro DIY builds click here:
http://djjondent.blogspot.com.au/2017/12/diy-index.html
-------------------------------------------------------------------------------------------------

Bastl Grandpa - eurorack sampler - build

Some pics of my Grandpa eurorack module build.
This is a sampler. Love the wooden panel.

 These aren't really build notes. See Bastl's official site for those.
http://www.bastl-instruments.com/grandpa-assembly/

 Though I hope some extra pics of my attempt to assemble it will help a bit more.
I usually put the IC sockets first then the resistors, etc etc.


 tHERE are 2 PCBs.


The upper board: Holds the jacks, pots, LED etc
A small mistake here. I soldered the LED display too close to the PCB.
It has long legs for a reason... so it can sit up against the panel.
You can still view the LED easily even if you did solder it against the PCB, but it will be even clearer if do.



tHE tricky bit .. soldering the SD card.



----------------------
Some pics from my Second build of the Grandpa.
THIS is version 1.2









The RGB LED.


 i soldered the SD card at the end.

-----------------------------------------------------------------------------------------------
For more Euro DIY builds click here:
http://djjondent.blogspot.com.au/2017/12/diy-index.html
-------------------------------------------------------------------------------------------------

Thursday, 5 April 2018

Basic OLED graphics - code

tHE next step with OLEDs is to get your own graphics
we need to convert monochromatic bitmaps to data arrays 
 
The size needs to be a 128 x 64 bitmap image
 Use microsoft paint to convert your image into a bitmap.
 
Next, use this program to convert the bitmap into a data array:
Choose horizontal
 
Another good program is:
 
This code prints the Korg logo, a map of the world, the Buchla logo & some 
music notes .
It's just an example.
This uses the U8glib library

Thanks to educ8s.tv for their excellent video
 
// PROGMEM this stores thebitmap in program memory

//###############################
 
 
#include "U8glib.h"

U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK);  

int frame = 0;

const unsigned char PROGMEM frame1 [] = {
//const uint8_t frame1[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x30, 0x0F, 0xFF, 0xFC, 0x00, 0x07, 0xFF, 0xFC, 0x00,
0x00, 0x04, 0x00, 0x80, 0x01, 0x10, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x02, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x24, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x04, 0x00, 0x18, 0x00, 0x80, 0x03, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x04, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x04, 0x00, 0x7F, 0xFC, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x04, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x00, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x80, 0x08, 0x00, 0x10, 0x00, 0x80, 0x03, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x04, 0x00, 0x20, 0x01, 0x00,
0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x44, 0x00, 0x20, 0x01, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x84, 0x00, 0x20, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0xE0, 0x00, 0x10, 0x00, 0x80, 0x00, 0x01, 0x04, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x04, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x44, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x04, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x08, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x04, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x24, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x80, 0x02, 0x00, 0x24, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x24, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x04, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x04, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0xC0, 0x04, 0x00, 0x18, 0x00, 0x80, 0x01, 0x00, 0x04, 0x00, 0x20, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x14, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x14, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x02, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0xA0, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x80, 0x09, 0x00, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x01, 0x20, 0x00, 0x04, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x02, 0x00,
0x00, 0x04, 0x00, 0x80, 0x01, 0x10, 0x00, 0x08, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x02, 0x00,
0x00, 0x03, 0xFE, 0x0F, 0xFC, 0x06, 0x00, 0x60, 0x0F, 0xF8, 0x7F, 0xF0, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

const unsigned char PROGMEM frame2 [] = {
//const uint8_t frame2[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, 0xCC, 0x00, 0x00, 0x00, 0x01, 0xF0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x3C, 0x18, 0x00, 0x00, 0x03, 0xFF, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x60, 0x03, 0xC0, 0x30, 0x00, 0x03, 0xF8, 0xFC, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xE0, 0xC0, 0x3C, 0x00, 0xC0, 0x03, 0xFC, 0x01, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x03, 0x03, 0xC0, 0x01, 0x83, 0xF8, 0x00, 0x1C, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x06, 0x7C, 0x00, 0x07, 0xF8, 0x00, 0x01, 0xE0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x0F, 0x80, 0x00, 0x08, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x70, 0x07, 0xF8, 0x00, 0x00, 0x3E, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x07, 0x83, 0xF8, 0x30, 0x00, 0x07, 0xCC, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3F, 0xFC, 0x00, 0x60, 0x00, 0x78, 0x18, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xFE, 0x00, 0x00, 0xC0, 0x07, 0x80, 0x20, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xC0, 0x00, 0x03, 0x00, 0x78, 0x00, 0xC0, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x06, 0x0F, 0x80, 0x01, 0x83, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x60, 0x00, 0x0C, 0xF0, 0x00, 0x03, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x20, 0x00, 0x1F, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x07, 0x9C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0xBC, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0xC0, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3C, 0xC0, 0xC3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xE0, 0x41, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0E, 0x00, 0x0F, 0x81, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x18, 0x00, 0xF0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x30, 0x0F, 0x20, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x78, 0x10, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xC7, 0x80, 0x18, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0xF9, 0x00, 0x08, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x80, 0x80, 0x0C, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0xC0, 0x04, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x40, 0x36, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x80, 0x61, 0xFE, 0x08, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x23, 0x03, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xC0, 0x3E, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x18, 0x03, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x18, 0x03, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x20, 0x30, 0x02, 0x79, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x30, 0x30, 0x07, 0x81, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x30, 0x0C, 0x01, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x18, 0x30, 0x0C, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x30, 0x38, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0C, 0x18, 0xE0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x1F, 0x80, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x06, 0x30, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x20, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x03, 0x60, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

const unsigned char PROGMEM frame3 [] = {
//const uint8_t frame3[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFE, 0x07, 0x87, 0xC0, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFE, 0x07, 0x87, 0xF8, 0xFF, 0x83, 0xC0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7F, 0xF9, 0xFF, 0xFC, 0x00, 0x00, 0x78, 0x7F, 0x87, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x3E, 0x03, 0xFF, 0xFC, 0x7F, 0xF0, 0x00, 0xF0, 0xCF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00,
0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xF0, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00,
0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00,
0x07, 0xFF, 0xFF, 0xFE, 0xFC, 0x7C, 0x3C, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00,
0x07, 0xFF, 0xFF, 0xF0, 0xF8, 0x38, 0x00, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x80, 0x00,
0x00, 0x0F, 0xFF, 0xF8, 0xFC, 0x00, 0x07, 0x9E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x07, 0x80, 0x00,
0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x80, 0x00,
0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0x80, 0x00,
0x00, 0x0F, 0xFF, 0xFF, 0xFC, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x00, 0x00,
0x00, 0x0F, 0xFF, 0xDF, 0xEC, 0x00, 0x00, 0xFF, 0xF7, 0xDF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x00,
0x00, 0x3F, 0xFF, 0xFF, 0xA4, 0x00, 0x07, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xD8, 0x00, 0x00,
0x00, 0x3F, 0xFF, 0xFE, 0x00, 0x00, 0x07, 0xCF, 0xFF, 0xEF, 0xFF, 0xFF, 0xFF, 0xDE, 0x00, 0x00,
0x00, 0x3F, 0xFF, 0xF8, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDE, 0x00, 0x00,
0x00, 0x3F, 0xFF, 0xF8, 0x00, 0x00, 0x07, 0xFC, 0x07, 0xFF, 0xFF, 0xFF, 0xFE, 0xDE, 0x00, 0x00,
0x00, 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x07, 0xFE, 0xF7, 0xFF, 0xFF, 0xFF, 0xFE, 0x30, 0x00, 0x00,
0x00, 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB0, 0x00, 0x00,
0x00, 0x0F, 0xF0, 0xC0, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00,
0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00,
0x00, 0x07, 0xC6, 0xF0, 0x00, 0x00, 0x7F, 0xFF, 0xFE, 0xFF, 0x0F, 0xFF, 0xFD, 0x80, 0x00, 0x00,
0x00, 0x01, 0xFF, 0xBF, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0x7F, 0x03, 0xE7, 0xEC, 0xC0, 0x00, 0x00,
0x00, 0x01, 0xFF, 0x3F, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0x3F, 0x03, 0xE7, 0xFC, 0xC0, 0x00, 0x00,
0x00, 0x00, 0x3F, 0x8D, 0x80, 0x00, 0x7F, 0xFF, 0xFF, 0xF8, 0x03, 0x87, 0xF0, 0xE0, 0x00, 0x00,
0x00, 0x00, 0x07, 0x9F, 0xC0, 0x00, 0x3F, 0xFF, 0xFF, 0xC0, 0x03, 0x81, 0xF0, 0x30, 0x00, 0x00,
0x00, 0x00, 0x07, 0xFF, 0xC0, 0x00, 0x3F, 0xFF, 0xFF, 0xF8, 0x01, 0x81, 0x81, 0xB0, 0x00, 0x00,
0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00, 0x3F, 0xFF, 0xFF, 0xF8, 0x01, 0xE1, 0xE1, 0xB0, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xF8, 0x00, 0x0F, 0xFF, 0xFF, 0xF8, 0x00, 0x61, 0xEF, 0xB0, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x1F, 0xFF, 0xE0, 0x00, 0x01, 0xEF, 0xB0, 0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x1F, 0xFF, 0xC0, 0x00, 0x00, 0x6F, 0xDF, 0xC0, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0xE0, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x30, 0xC3, 0xF0, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0xE0, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x3E, 0xF3, 0xF0, 0x00,
0x00, 0x00, 0x00, 0xFF, 0xFF, 0xE0, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x0E, 0xF0, 0xF0, 0x00,
0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x07, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1F, 0xFF, 0xC0, 0x00, 0x07, 0xFF, 0x78, 0x00, 0x00, 0x00, 0x3F, 0xF0, 0x00,
0x00, 0x00, 0x00, 0x1F, 0xFF, 0x80, 0x00, 0x07, 0xFF, 0x78, 0x00, 0x00, 0x00, 0xFF, 0xF0, 0x00,
0x00, 0x00, 0x00, 0x07, 0xFF, 0x80, 0x00, 0x07, 0xFE, 0x78, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00,
0x00, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFE, 0x78, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00,
0x00, 0x00, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x01, 0xFE, 0x60, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00,
0x00, 0x00, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00,
0x00, 0x00, 0x00, 0x07, 0xFC, 0x00, 0x00, 0x01, 0xF8, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xF8, 0x00,
0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xF0, 0x00,
0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x60,
0x00, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x60,
0x00, 0x00, 0x00, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x83, 0xE0,
0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x87, 0xC0,
0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x03, 0xC3, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xEE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xEC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

//const uint8_t frame4[] PROGMEM = {
const unsigned char PROGMEM frame4 [] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xE7, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0xE7, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x1F, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x1F, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF8, 0x07, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x1F, 0xE0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8,
0x00, 0x00, 0x1F, 0xFF, 0xFF, 0x00, 0xF8, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8,
0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF8,
0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x07, 0xF8,
0x00, 0xFF, 0xE0, 0x00, 0x00, 0xFF, 0xF8, 0x00, 0x00, 0x1F, 0xE0, 0x00, 0x00, 0x00, 0x1F, 0xE0,
0x07, 0xF8, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x07, 0xFF, 0x00,
0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00,
0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00,
0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF8, 0x00, 0x00,
0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xF8, 0x00, 0x00, 0x00, 0x07, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0xE0, 0x00, 0x00, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

void draw()
{
  if(frame==0)
   u8g.drawBitmapP( 0, 0, 16, 64, frame1);
  else if (frame == 1)
   u8g.drawBitmapP( 0, 0, 16, 64, frame2);
  else if(frame == 2)
   u8g.drawBitmapP( 0, 0, 16, 64, frame3);
   else if(frame == 3)
   u8g.drawBitmapP( 0, 0, 16, 64, frame4);
}

void setup(void) {
}

void loop(void) {

 u8g.firstPage();
  do{
   draw();
 } while(u8g.nextPage());
 
 frame ++;
 if(frame>3)
 frame = 0;
delay(3000);
}

// &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 




The code without the images is here:
Just add your own

// *******************************************

#include "U8glib.h"

U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK);  

int frame = 0;

// PROGMEM this stores thebitmap in program memory

const unsigned char PROGMEM frame1 [] = {
// add your bitmap array here
};

const unsigned char PROGMEM frame2 [] = {
// add your bitmap array here
};

const unsigned char PROGMEM frame3 [] = {
// add your bitmap array here
};

const unsigned char PROGMEM frame4 [] = {
// add your bitmap array here
};

void draw()
{
  if(frame==0)
   u8g.drawBitmapP( 0, 0, 16, 64, frame1);
  else if (frame == 1)
   u8g.drawBitmapP( 0, 0, 16, 64, frame2);
  else if(frame == 2)
   u8g.drawBitmapP( 0, 0, 16, 64, frame3);
   else if(frame == 3)
   u8g.drawBitmapP( 0, 0, 16, 64, frame4);
}

void setup(void) {
}

void loop(void) {

 u8g.firstPage();
  do{
   draw();
 } while(u8g.nextPage());
 
 frame ++;
 if(frame>3)
 frame = 0;
delay(3000);
}

// &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&


Links
-------------------------------------------------------------------------------------------

 ---------------------------------
-------------------------------------

Thursday, 29 March 2018

Switch Case Statements - Arduino

 This is a bit like a roundabout.
It's a control structure.
It lets you choose from many different routes.... depending of the value of a variable.
It's like a series of  "if" statements.

Good for menus... keeps everything tidy.
 
It starts with the word switch(). 
Then in the parenthesis, you type the name of the variable that determines the case

The break keyword exits the switch statement, and is typically used at the end of each case. 
 

 

Example 1
Many thanks to Programming Electronics for the example.
 
The circuit:
 * 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors

 created 1 Jul 2009
 by Tom Igoe

This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/SwitchCase2
 

 //************************************************************
/*
  Switch statement  with serial input

 Demonstrates the use of a switch statement.  The switch
 statement allows you to choose from among a set of discrete values
 of a variable.  It's like a series of if statements.

 To see this sketch in action, open the Serial monitor and send any character.
 The characters a, b, c, d, and e, will turn on LEDs.  Any other character will turn
 the LEDs off.

 The circuit:
 * 5 LEDs attached to digital pins 2 through 6 through 220-ohm resistors

 created 1 Jul 2009
 by Tom Igoe

This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/SwitchCase2
 */

void setup() {
  // initialize serial communication:
  Serial.begin(9600);
  // initialize the LED pins:
  for (int thisPin = 2; thisPin < 7; thisPin++) {
    pinMode(thisPin, OUTPUT);
  }
}

void loop() {
  // read the sensor:
  if (Serial.available() > 0) {
    int inByte = Serial.read();
    // do something different depending on the character received.
    // The switch statement expects single number values for each case;
    // in this exmaple, though, you're using single quotes to tell
    // the controller to get the ASCII value for the character.  For
    // example 'a' = 97, 'b' = 98, and so forth:

    switch (inByte) {
      case 'a':
        digitalWrite(2, HIGH);
        break;
      case 'b':
        digitalWrite(3, HIGH);
        break;
      case 'c':
        digitalWrite(4, HIGH);
        break;
      case 'd':
        digitalWrite(5, HIGH);
        break;
      case 'e':
        digitalWrite(6, HIGH);
        break;
      default:
        // turn all the LEDs off:
        for (int thisPin = 2; thisPin < 7; thisPin++) {
          digitalWrite(thisPin, LOW);
        }
    }
  }
}
//***********************************************************************
 

 
 
 
 Links
+ https://www.arduino.cc/reference/tr/language/structure/control-structure/switchcase/ 
+ https://www.programmingelectronics.com/tutorial-14-5-switch-case-statement-old-version/

 ---------------------------------
-------------------------------------

Tuesday, 27 March 2018

Rotary Encoder & switch/button press - arduino

I was looking for some code that utilised the encoder's switch.
The switch goes LOW when its pressed.
 
This is a very simple test of your encoder.
We Need to use the serial monitor to test.

It has 5 pins:
1. CLK - Clock (Out B)
2. DT - data (Out A)
3. SW - switch (when we press the shaft, the switch connects to GND. Otherwise it is floating.)
4. + : Vcc
5. GND
 

You most often will find encoders without the breakout board.
 
They still have 5 pins.
Here there are two GNDs
There is no Vcc
 
 
 
 
 
 
Make sure you connect both ground pins.
Connect the CLK (out B) to digital pin#2
DT (out A)  to #3 
SW (switch) to digital pin 4
 


 
 This is the code.
// *****************************
// Rotary Encoder Inputs
// the declaration of the Arduino pins to which the encoder’s CLK, DT 
// and SW pins are connected. 
#define CLK 2
#define DT 3
#define SW 4

int counter = 0; //  represents the count that will be modified each time that the knob is rotated one detent (click).
int currentStateCLK; // hold the state of the CLK output and are used for determining the amount of rotation.
int lastStateCLK;
String currentDir =""; //used when printing the current direction of rotation on the serial monitor.
unsigned long lastButtonPress = 0;//  used to debounce a switch

void setup() {
	
	// Set encoder pins as inputs
	pinMode(CLK,INPUT);
	pinMode(DT,INPUT);
	pinMode(SW, INPUT_PULLUP);

	// Setup Serial Monitor
	Serial.begin(9600);

	// Read the initial state of CLK and store it in the lastStateCLK variable
	lastStateCLK = digitalRead(CLK);
}

void loop() {
	
	// Read the current state of CLK
	currentStateCLK = digitalRead(CLK);

	// If last and current state of CLK are different, then pulse occurred
	// React to only 1 state change to avoid double count
	if (currentStateCLK != lastStateCLK  && currentStateCLK == 1){

		// If the DT state is different than the CLK state then
		// the encoder is rotating CCW so decrement
		if (digitalRead(DT) != currentStateCLK) {
			counter --;
			currentDir ="CCW";
		} else {
			// Encoder is rotating CW so increment
			counter ++;
			currentDir ="CW";
		}

		Serial.print("Direction: ");
		Serial.print(currentDir);
		Serial.print(" | Counter: ");
		Serial.println(counter);
	}

	// Remember last CLK state
	lastStateCLK = currentStateCLK;

	// Read the button state
	int btnState = digitalRead(SW);

	//If we detect LOW signal, button is pressed
	if (btnState == LOW) {
		//if 50ms have passed since last LOW pulse, it means that the
		//button has been pressed, released and pressed again
		if (millis() - lastButtonPress > 50) {
			Serial.println("Button pressed!");
		}

		// Remember last button press event
		lastButtonPress = millis();
	}

	// Put in a slight delay to help debounce the reading
	delay(1);
}
//**************************************************


 
 Links
 Last minute engineers provided the code in this post. Many thanks.
 
+ https://www.instructables.com/Improved-Arduino-Rotary-Encoder-Reading/ 
+ https://playground.arduino.cc/Main/RotaryEncoders/
 
 ---------------------------------
-------------------------------------

Tuesday, 20 March 2018

Korg Electribe - History

 The Korg Electribe is a classic series of electronic instruments the first
of which started production last century. The range is still being produced today.
They use both analog modeling & sampling technologies.
They started as synths, drum machines & samplers.
The modern Electribes are fully integrated workstations.
 

Up to today, there have been 4 generations.

--------------------------------------------------
1st generation - Released 1999-2001

 
    EA-1: Analog Modeling Synthesizer 

    1999. Purely a synth.
     Two voices, 1 filter
      Distortion, Tempo delay, chorus/flanger
      MIDI
 
 
 
 
 
 
 
 
 

 
 
  ER-1: Rhythm Synthesizer. 
     Drum Machine
      1999. 
      10 Parts (4 synthesizer parts,
                    2 audio in parts,   
                    2 hi-hat parts, 
                    1 crash cymbal part, 
                    1 hand clap part)
      MIDI
 
 
 
 
 
ES-1: Rhythm Production Sampler
Year 2000
This was one of the first samplers that let you process recorder sounds.
They were 32kHz.
This could store up to 95 seconds (mono) or 47.5 seconds (stereo) or recording time .
100 mono or 50 stereo samples can be stored.
 
MIDI
 12 parts
 EM-1: Music Production Station
Year : 2001
 This was the first music production station.
It combined a drum machine and two synth parts.
 
 The drum machine had 8 voices.

Lots of effects.
Eg Reverb, Flanger/Chorus, Phaser, Ring modulator, Pitch shifter, Compressor, Distortion, 
delays, etc.
 
 
 
--------------------------------------------
 

 2nd generation - Released 2003-4
Korg released Mark2 versions of their synth, drum and sampler electribes.

  

  EA-1 mkII: Analog Modeling Synthesizer
Again , purely a synth.
   
 number of parts: 2
Memory: 256 pieces patterns_16
 
 
 
 
 
 
 
 
 

 ER-1 mkII: Rhythm Synthesizer
The drum machine.
combines a four-part DSP-based synthesizer with four additional PCM sound sources,
  
 
 
 
 
 
 
 
 
 
 

ES-1 mkII: Rhythm Production Sampler 

    (using SmartMedia storage. Maximum size card recognized is 64MB)
 Number of parts: 12
 Maximum Sampling Time: 95 (mono) / 47.5 (stereo) seconds
 
 
 
 
 
 
 
 

  ESX-1: Music Production Sampler (using SmartMedia storage)
This is a workstation.
Interesting as they added vacuum tubes.
 16 voices
2 synth parts, 9 drum parts, 1 drum accent part, 2 stretch part, 1 slice part, 1 audio in part
 
 Sampling frequency: 44.1 kHz
Maximum 285 (mono) seconds
 
 
 
 
 
   
EMX-1: Music Production Station
2003
 (using SmartMedia storage)
 Again ... Tubes
16 voices.
  5 synth parts, 9 drum parts, 1 synthesizer accent part, 1 drum accent part
 
 4 types of filter. LP, BP, HP, BP+
 
 
 
 
 
 
 
 
-----------------------------------
 
3rd generation - Released 2010
These were identical to the ESX & EMX above, except they used SD cards instead of the Smart Media cards.

    ESX-1SD: Music Production Sampler
     (Identical to the ESX-1, but using Secure Digital (SD) storage)
    EMX-1SD: Music Production Station
     (Identical to the EMX-1, but using Secure Digital (SD) storage)
 
--------------------------
Apple iPad versions
 
  

  iElectribe: an app for the iPad
This is the GORILLAZ Edition

 
 
 
 
 
 
 
 
 
 
  

iElectribe: an app for the iPhone

 
 
 
 
 
 

 Electribe Wave: an app for the iPad and iPhone
 
 
 
 
 
 
 
 
 
 
 
 
 ---------------------

4th generation - Announced Sept 2014 
Still in production

   

electribe: Music Production Station
     (using SD Card storage)
 
 
 
 
 
 
 
 
 
 
 

   electribe sampler: Music Production Sampler
     (using SD Card storage)