You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.4 KiB
Arduino

5 years ago
#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);
}
}