master
anna sandri 4 years ago
parent 7cb6e0c8ff
commit 5856988bfe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

@ -0,0 +1,77 @@
#include <fontALL.h>
#include <avr/pgmspace.h>
#include <TVout.h>
#include "mouthclosed.h"
#include "mouthopen.h"
#include "top.h"
int knob1;
int knob2;
int knob3;
char HELLO []= "hello!";
char H []= "01101000";
char E []= "01100101";
char L []= "01101100";
char O []= "01101111";
char IPA []= "ˈləʊ";
TVout TV;
void setup() {
Serial.begin(9600);
TV.select_font(font6x8);
TV.begin(PAL,120,96);
}
void loop() {
knob2=analogRead(A1);
TV.bitmap (0,0,top);
TV.bitmap (0,55,mouthclosed);
TV.delay (500);
TV.bitmap (0,55,mouthopen);
TV.delay (500);
Serial.println(knob2);
if (knob2>0 && knob2<400){
TV.clear_screen ();
//TV.draw_rect (70,10,45,80,WHITE,WHITE);
TV.select_font(font8x8ext);
//TV.fill (INVERT);
TV.print(70,20,HELLO);
TV.println(70,30,HELLO);
TV.println(70,40,HELLO);
TV.println(70,50,HELLO);
TV.println(70,60,HELLO);
TV.println(70,70,HELLO);
}
if (knob2>400 && knob2<700){
TV.clear_screen ();
TV.select_font(font4x6);
TV.print(70,70,HELLO);
TV.println(70,60,IPA);
//delay (50);
}
if (knob2>700){
TV.clear_screen ();
//TV.fill(INVERT);
TV.select_font(font6x8);
TV.print(70,20,H);
TV.print(70,30,E);
TV.print(70,40,L);
TV.print(70,50,L);
TV.print(70,60,O);
//delay (50);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

@ -0,0 +1,46 @@
#include "mouthclosed.h"
const unsigned char mouthclosed [] PROGMEM = {
70,41,
0x00,0x00,0x00,0x00,0x00,0x7F,0xF8,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0x7F,0xF8,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xF8,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0xFF,0xF8,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x1E,0x00,
0x00,0x00,0x00,0x7F,0xFF,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x8F,0xFE,0x00,0x00,0x1E,0x00,
0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,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
};

@ -0,0 +1,6 @@
#include <avr/pgmspace.h>
//#ifndef MOUTHCLOSED_H
#define MOUTHCLOSED_H
extern const unsigned char mouthclosed [];
//#endif

@ -0,0 +1,46 @@
#include "mouthopen.h"
const unsigned char mouthopen [] PROGMEM = {
70,41,
0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0x3F,0xFE,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0xFE,0x00,
0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x06,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x3E,0x00,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x1E,0x00,
0x00,0x00,0x00,0x3F,0xFF,0x80,0x00,0x1E,0x00,
0x00,0x00,0x00,0x7F,0xFF,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x8F,0xFE,0x00,0x00,0x1E,0x00,
0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1E,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x03,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
};

@ -0,0 +1,6 @@
#include <avr/pgmspace.h>
//#ifndef MOUTHOPEN_H
#define MOUTHOPEN_H
extern const unsigned char mouthopen [];
//#endif

@ -0,0 +1,60 @@
#include "top.h"
const unsigned char top [] PROGMEM = {
70,55,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x3F,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,
0x3F,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x7F,0xE0,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x1F,0xF0,
0x00,0x00,0x00,0x01,0xE0,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x1E,0x00,
0x00,0x00,0xE0,0x00,0x1F,0x00,0x00,0x1E,0x00,
0x00,0x00,0x7C,0x00,0x7B,0x00,0x00,0x1E,0x00,
0x00,0x00,0x1F,0xFF,0xE3,0x80,0x00,0x1E,0x00,
0x00,0x1F,0x03,0xFF,0x81,0xC0,0x00,0x1E,0x00,
0x00,0x1F,0x00,0x00,0x01,0xC0,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0xE0,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0xE0,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x1E,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x1E,0x01,0xFF,0x80,0x70,0x00,0x1E,0x00,
0x00,0x06,0x07,0xFF,0xE0,0x70,0x00,0x1E,0x00,
0x00,0x06,0x0E,0x00,0x60,0xE0,0x00,0x1E,0x00,
0x00,0x06,0x0C,0x1C,0x00,0xE0,0x00,0x1E,0x00,
0x00,0x06,0x00,0x3E,0x00,0xE0,0x00,0x1E,0x00,
0x0F,0xE6,0x00,0x3E,0x00,0xE0,0x00,0x1E,0x00,
0x1F,0xE6,0x00,0x3E,0x00,0xE0,0x00,0x1E,0x00,
0x38,0x60,0x70,0x1C,0x00,0xE0,0x00,0x1E,0x00,
0x70,0x60,0x7C,0x00,0x00,0x70,0x00,0x1E,0x00,
0x70,0x00,0x1E,0x00,0xC0,0x78,0x00,0x1E,0x00,
0x70,0x00,0x07,0xFF,0xC0,0x3C,0x00,0x1E,0x00,
0x70,0x00,0x03,0xFF,0x80,0x1E,0x00,0x1E,0x00,
0x76,0x00,0x00,0x00,0x00,0x0F,0x00,0x1E,0x00,
0x77,0x00,0x00,0x00,0x00,0x07,0x80,0x1E,0x00,
0x73,0x80,0x00,0x00,0x00,0x03,0xC0,0x1E,0x00,
0x71,0xC0,0x00,0x00,0x00,0x01,0xE0,0x1E,0x00,
0x70,0xE0,0x00,0x00,0x00,0x00,0xF0,0x1E,0x00,
0x78,0x70,0x00,0x00,0x00,0x00,0x78,0x1E,0x00,
0x3C,0x30,0x00,0x00,0x00,0x00,0x38,0x1E,0x00,
0x1E,0x00,0x00,0x00,0x19,0xE0,0x1C,0x1E,0x00,
0x0F,0x00,0x00,0x00,0x19,0xE0,0x0C,0x1E,0x00,
0x07,0x83,0x00,0x00,0x19,0xFF,0xFC,0x1E,0x00,
0x03,0xC3,0x00,0x00,0x1F,0xFF,0xF8,0x1E,0x00,
0x01,0xE3,0x00,0x00,0x1F,0xFF,0xF0,0x1E,0x00,
0x00,0xFF,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x3E,0x00,0x00,0x00,0x70,0x00,0x1E,0x00,
0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x1E,0x00
};

@ -0,0 +1,6 @@
#include <avr/pgmspace.h>
//#ifndef TOP_H
#define TOP_H
extern const unsigned char top [];
//#endif

@ -32,7 +32,8 @@ void setup() {
pinMode(13, OUTPUT);
Serial.println(TV.vres());
Serial.println(TV.hres());
TV.begin(PAL,120,96);
TV.begin(PAL,120,96);
Serial.begin(9600);
}
void loop() {
@ -41,12 +42,13 @@ void loop() {
//incomingAudio = (incomingAudio+1)/4 - 1;//scale from 10 bit (0-1023) to 8 bit (0-255);
//if (incomingAudio<0){
// }
TV.select_font(font8x8);
knob1 = analogRead(1);
knob2 = analogRead(2);
knob3 = analogRead(3);
Serial.println(knob2);
//myChar = pgm_read_byte (1);
if (knob2>0 && knob2<255){

Loading…
Cancel
Save