Skip to content

Commit

Permalink
Better gif, removed other examples, added this one
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanMathy committed Oct 3, 2020
1 parent 806af19 commit fadd2c7
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 146 deletions.
47 changes: 0 additions & 47 deletions CU40045/examples/Brightness/Brightness.ino

This file was deleted.

62 changes: 0 additions & 62 deletions CU40045/examples/CustomCharDemo/CustomCharDemo.ino

This file was deleted.

37 changes: 0 additions & 37 deletions CU40045/examples/HelloDemo/HelloDemo.ino

This file was deleted.

57 changes: 57 additions & 0 deletions CU40045/examples/Ticker/Ticker.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#include <CUU_Parallel_M68.h>
#include <Noritake_VFD_CUU.h>
#include <util/delay.h>

// Change your pins to follow this order:
// RS, RW, E1, E2, D0, D1, D2, D3, D4, D5, D6, D7
CUU_Parallel_M68 interface(13,12, 11, 2, 3,4,5,6,7,8,9,10);

Noritake_VFD_CUU vfd;
bool done;

class TypeWriter{

const char *value;

public:
TypeWriter (const char *v){
value = v;
}
void tick(){
if (*value)
vfd.print(*value++);
else
done = true;
}
};

TypeWriter writer("Hello, world!");


void setup() {

_delay_ms(500);
vfd.interface(interface);

vfd.CUU_init();
vfd.CUU_cursorOn();
_delay_ms(3000);

}

bool on;

void loop() {
if(!done) {
writer.tick();
return delay(random(100, 600));
}

if(on)
vfd.CUU_cursorOn();
else
vfd.CUU_cursorOff();

_delay_ms(500);
on = ! on;
}
Binary file modified img/ticker.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fadd2c7

Please sign in to comment.