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.

95 lines
1.8 KiB
C++

#include <fontALL.h>
#include <font8x8.h>
#include <font4x6.h>
#include <font6x8.h>
#include <font8x8ext.h>
#include <fontALL.h>
#include <TVout.h>
//#include <avr/pgmspace.h>
//const char W [] PROGMEM = { W WHISPER };
//const char C [] PROGMEM = { C CREAK };
//const char V [] PROGMEM = { V MODAL VOICE };
//const char F [] PROGMEM = { F FALSETTO };
char third []= "{V}isModal_Voice";
char fourth []= "{F}isFalsetto";
char first []= "{W}isWhisper";
char second []= "{C}isCreak";
int knob1;
int knob2;
int knob3;
//int incomingAudio; //(option to read sound)
TVout TV;
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
Serial.println(TV.vres());
Serial.println(TV.hres());
TV.begin(PAL,120,96);
}
void loop() {
// put your main code here, to run repeatedly:
//incomingAudio= analogRead (A2);
//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);
//myChar = pgm_read_byte (1);
if (knob2>0 && knob2<255){
TV.clear_screen();
TV.println(0,0,first);
delay (1000);
TV.draw_rect (0,70,10,10,WHITE,WHITE);
delay (200);
}
else if (knob2>255 && knob2<510){
TV.clear_screen();
//TV.fill(INVERT);
TV.println(0,20,second);
//TV.fill(INVERT);
TV.draw_rect (0,70,80,20,WHITE);
delay (200);
}
else if (knob2>510 && knob2<750){
TV.clear_screen();
TV.println(0,40,third);
TV.draw_rect (40,70,30,30,WHITE,WHITE);
delay (200);
}
else if (knob2>750 && knob2<1023){
TV.clear_screen();
TV.println(0,70,fourth);
delay (1000);
TV.draw_rect (0,0,30,30,WHITE);
//TV.fill(INVERT);
delay (200);
}
//if (knob1<0 && knob1>255){
// }
}