pcb and ino files
parent
433866e828
commit
5017ac535d
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef FONTALL_H
|
||||||
|
#define FONTALL_H
|
||||||
|
|
||||||
|
#include "TVoutfonts/font4x6.h"
|
||||||
|
#include "TVoutfonts/font6x8.h"
|
||||||
|
#include "TVoutfonts/font8x8.h"
|
||||||
|
#include "TVoutfonts/font8x8ext.h"
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,121 @@
|
|||||||
|
#include <TVout.h>
|
||||||
|
#include <fontALL.h>
|
||||||
|
|
||||||
|
TVout TV;
|
||||||
|
unsigned char x,y;
|
||||||
|
|
||||||
|
const char signMessage0[] PROGMEM = {" >>> [7] by Sandra Golubjevaite >>> Special Issue X >>> XPUB1 >>> PZI >>> Rotterdam >>> 2019 <<<"};
|
||||||
|
const char signMessage1[] PROGMEM = {" >>>> okokokok >> what >> dont be scared >> seven [7] is a straight forward .print & .read device >> you can play the prewritten poem [seven.ino] or you can write your own >> [7] can manipulate text >>"};
|
||||||
|
const char signMessage2[] PROGMEM = {" it can send an outgoing message or be interrupted by an incoming one >> [7] enjoys repetition, coincidence & a gentle touch >> to channel text the module needs to be connected to a TV screen through a video input >>"};
|
||||||
|
const char signMessage3[] PROGMEM = {" a video signal is broadcasted and can be listened to in mono >>>>>> mhmhmhmh >> how >> how i approached hardware >> 7 knobs & 7 buttons arranged in no particular hierarchy >> i wanted to create a humble device with clear manual functions >>"};
|
||||||
|
const char signMessage4[] PROGMEM = {" an interface that makes you feel in control >> this urge became clear after getting familiar with a term [calm technology] during the Special Issue X >> calm technology - a type of information technology where the interaction between the technology"};
|
||||||
|
const char signMessage5[] PROGMEM = {" and its user is designed to occur in the user's periphery rather than constantly at the centre of attention >> how >> how i approached software >> working within the framework of the tv.out library and a television monitor determined certain "};
|
||||||
|
const char signMessage6[] PROGMEM = {" features of the program, such as its esthetics and its interface >> with a subject in mind the content of the poem [seven.ino] was developed and written while learning how to code with Arduino IDE >> the way the poem unfolds to a user depends on"};
|
||||||
|
const char signMessage7[] PROGMEM = {" his/hers interaction with [7] >>>>>> ghhrrghrrr >> why >> in the beginning of the Special Issue X i was intrigued by DadaDodo >> DadaDodo is a program that analyses texts for word probabilities and then generates random sentences based on that >>"};
|
||||||
|
const char signMessage8[] PROGMEM = {" sometimes these sentences are nonsense but sometimes they cut right through to the heart of the matter and reveal hidden meanings >> i was also interested in the experimental poetry examples mentioned in Florian Cramers [words made flesh] >>"};
|
||||||
|
const char signMessage9[] PROGMEM = {" but why >> repetition of text is a method that i practice during live vocal performances >> a partial looping of a poem functions as a transition or/and an emphasis >> as a poet i am interested in a life of a written static poem-block >>"};
|
||||||
|
const char signMessage10[] PROGMEM = {" when a poem does not have a voice present how could it still rustle? >> [7] is a first prototype towards that idea <<<<<<"};
|
||||||
|
|
||||||
|
unsigned int displayInt;
|
||||||
|
char myChar0;
|
||||||
|
char myChar1;
|
||||||
|
char myChar2;
|
||||||
|
char myChar3;
|
||||||
|
char myChar4;
|
||||||
|
char myChar5;
|
||||||
|
char myChar6;
|
||||||
|
char myChar7;
|
||||||
|
char myChar8;
|
||||||
|
char myChar9;
|
||||||
|
char myChar10;
|
||||||
|
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(9600);
|
||||||
|
TV.begin(PAL);
|
||||||
|
|
||||||
|
TV.select_font(font8x8);
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage0); k++) {
|
||||||
|
myChar0 = pgm_read_byte_near(signMessage0 + k);
|
||||||
|
TV.print(myChar0);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.select_font(font6x8);
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage1); k++) {
|
||||||
|
myChar1 = pgm_read_byte_near(signMessage1 + k);
|
||||||
|
TV.print(myChar1);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage2); k++) {
|
||||||
|
myChar2 = pgm_read_byte_near(signMessage2 + k);
|
||||||
|
TV.print(myChar2);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage3); k++) {
|
||||||
|
myChar3 = pgm_read_byte_near(signMessage3 + k);
|
||||||
|
TV.print(myChar3);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage4); k++) {
|
||||||
|
myChar4 = pgm_read_byte_near(signMessage4 + k);
|
||||||
|
TV.print(myChar4);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage5); k++) {
|
||||||
|
myChar5 = pgm_read_byte_near(signMessage5 + k);
|
||||||
|
TV.print(myChar5);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage6); k++) {
|
||||||
|
myChar6 = pgm_read_byte_near(signMessage6 + k);
|
||||||
|
TV.print(myChar6);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage7); k++) {
|
||||||
|
myChar7 = pgm_read_byte_near(signMessage7 + k);
|
||||||
|
TV.print(myChar7);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage8); k++) {
|
||||||
|
myChar8 = pgm_read_byte_near(signMessage8 + k);
|
||||||
|
TV.print(myChar8);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage9); k++) {
|
||||||
|
myChar9 = pgm_read_byte_near(signMessage9 + k);
|
||||||
|
TV.print(myChar9);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
TV.clear_screen();
|
||||||
|
|
||||||
|
for (byte k = 0; k < strlen(signMessage10); k++) {
|
||||||
|
myChar10 = pgm_read_byte_near(signMessage10 + k);
|
||||||
|
TV.print(myChar10);
|
||||||
|
delay(50);}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef FONTALL_H
|
||||||
|
#define FONTALL_H
|
||||||
|
|
||||||
|
#include "TVoutfonts/font4x6.h"
|
||||||
|
#include "TVoutfonts/font6x8.h"
|
||||||
|
#include "TVoutfonts/font8x8.h"
|
||||||
|
#include "TVoutfonts/font8x8ext.h"
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,328 @@
|
|||||||
|
// TV.OUT LIBRARY
|
||||||
|
#include <TVout.h>
|
||||||
|
#include <fontALL.h>
|
||||||
|
|
||||||
|
// for incoming serial data
|
||||||
|
int incomingByte = 0;
|
||||||
|
|
||||||
|
// TV.OUT LIBRARY
|
||||||
|
TVout TV;
|
||||||
|
unsigned char x,y;
|
||||||
|
|
||||||
|
int zOff = 150;
|
||||||
|
int xOff = 0;
|
||||||
|
int yOff = 0;
|
||||||
|
int cSize = 50;
|
||||||
|
int view_plane = 64;
|
||||||
|
float angle = PI/60;
|
||||||
|
|
||||||
|
|
||||||
|
// P1-P7
|
||||||
|
int toggle_1;
|
||||||
|
int toggle_2;
|
||||||
|
int toggle_3;
|
||||||
|
int toggle_4;
|
||||||
|
int toggle_5;
|
||||||
|
int toggle_6;
|
||||||
|
int toggle_7;
|
||||||
|
|
||||||
|
|
||||||
|
//SHUFFLE TEXT
|
||||||
|
void shuffle(char *array, size_t n)
|
||||||
|
{
|
||||||
|
if (n > 1)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
for (i = 0; i < n - 1; i++)
|
||||||
|
{
|
||||||
|
size_t j = i + rand() / (RAND_MAX / (n - i) + 1);
|
||||||
|
int t = array[j];
|
||||||
|
array[j] = array[i];
|
||||||
|
array[i] = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char t0[] PROGMEM = "20:00"; // "String 0" etc are strings to store - change to suit.
|
||||||
|
const char t1[] PROGMEM = "21:00";
|
||||||
|
const char t2[] PROGMEM = "22:00";
|
||||||
|
const char t3[] PROGMEM = "sun";
|
||||||
|
const char t4[] PROGMEM = "is";
|
||||||
|
const char t5[] PROGMEM = "down";
|
||||||
|
const char t6[] PROGMEM = "23:00";
|
||||||
|
const char t7[] PROGMEM = "00:00";
|
||||||
|
const char t8[] PROGMEM = "PAVEMENT";
|
||||||
|
// Then set up a table to refer to your strings.
|
||||||
|
const char *const string_table[] PROGMEM = {t0, t1, t2, t3, t4, t5, t6, t7, t8};
|
||||||
|
|
||||||
|
|
||||||
|
const char *const string_table2[] PROGMEM = {t0, t1, t2};
|
||||||
|
char input[] = "sundown9";
|
||||||
|
char buffer[255] = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//TEXT
|
||||||
|
const char *animals[] = {"repetative", " ", "on", "cockroach"}; //A0
|
||||||
|
|
||||||
|
const char *BOBZ[] = {"labour", "silhouette", "bark", "or", "alligators ", "pitbulls", "depending"}; //A1
|
||||||
|
|
||||||
|
const char *part3[] = {"like", "wind", "not", "overdo"}; //A2
|
||||||
|
|
||||||
|
const char *part4[] = {
|
||||||
|
"dont be scared",
|
||||||
|
" dont avoid",
|
||||||
|
"you are soft",
|
||||||
|
" HANDS"
|
||||||
|
};
|
||||||
|
|
||||||
|
const byte letter = 25;
|
||||||
|
char *letters[letter] = {"RUFF","A","B","C","D","RUDE","E","F","G","K","L","repetitive labour","M","N","O","P","R","S","T","U","V","W","Y","Z"};
|
||||||
|
|
||||||
|
const char *words[] ={"street", "at night they", "by day"};
|
||||||
|
|
||||||
|
|
||||||
|
const int BUTTON1 = 4; //B1
|
||||||
|
const int BUTTON2 = 5; //B2
|
||||||
|
const int BUTTON3 = 6; //B3
|
||||||
|
const int BUTTON4 = 7; //B4
|
||||||
|
const int BUTTON5 = 8; //B5
|
||||||
|
const int BUTTON6 = 9; //B6
|
||||||
|
const int BUTTON7 = 10; //B7
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int val1= 0;
|
||||||
|
int val2= 0;
|
||||||
|
int val3= 0;
|
||||||
|
int val4= 0;
|
||||||
|
int val5= 0;
|
||||||
|
int val6= 0;
|
||||||
|
int val7= 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
|
||||||
|
|
||||||
|
TV.begin(PAL);
|
||||||
|
TV.select_font(font4x6);
|
||||||
|
//Serial.begin(9600);
|
||||||
|
//TV.println(input);
|
||||||
|
//TV.println(input);
|
||||||
|
|
||||||
|
pinMode(BUTTON1, INPUT);
|
||||||
|
pinMode(BUTTON2, INPUT);
|
||||||
|
pinMode(BUTTON3, INPUT);
|
||||||
|
pinMode(BUTTON4, INPUT);
|
||||||
|
pinMode(BUTTON5, INPUT);
|
||||||
|
pinMode(BUTTON6, INPUT);
|
||||||
|
pinMode(BUTTON7, INPUT);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
|
||||||
|
|
||||||
|
toggle_1 = analogRead(A6); //P1
|
||||||
|
toggle_2 = analogRead(A5); //P2
|
||||||
|
toggle_3 = analogRead(A4); //P3
|
||||||
|
toggle_4 = analogRead(A3); //P4
|
||||||
|
toggle_5 = analogRead(A2); //P5
|
||||||
|
toggle_6 = analogRead(A1); //P6
|
||||||
|
toggle_7 = analogRead(A0); //P7
|
||||||
|
|
||||||
|
|
||||||
|
val1 = digitalRead(BUTTON1);
|
||||||
|
val2 = digitalRead(BUTTON2);
|
||||||
|
val3 = digitalRead(BUTTON3);
|
||||||
|
val4 = digitalRead(BUTTON4);
|
||||||
|
val5 = digitalRead(BUTTON5);
|
||||||
|
val6 = digitalRead(BUTTON6);
|
||||||
|
val7 = digitalRead(BUTTON7);
|
||||||
|
|
||||||
|
//int l = strlen(string_table);
|
||||||
|
//shuffle(input, l );
|
||||||
|
//TV.println(input);
|
||||||
|
//delay(200);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//B1
|
||||||
|
if (val1 == HIGH) {
|
||||||
|
TV.select_font(font4x6);
|
||||||
|
TV.print("POETRY");
|
||||||
|
Serial.print("POETRY"); //SEND TX
|
||||||
|
TV.draw_line(60,20,60,76,WHITE);
|
||||||
|
} //done
|
||||||
|
|
||||||
|
//B2
|
||||||
|
if (val2 == HIGH) {
|
||||||
|
TV.select_font(font6x8);
|
||||||
|
TV.print("corner");
|
||||||
|
TV.draw_line(20,20,60,76,WHITE);
|
||||||
|
|
||||||
|
if(toggle_4 < 500){
|
||||||
|
TV.print("worst-case scenario",10,10);
|
||||||
|
Serial.print("worst-case scenario"); //SEND TX
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//B3
|
||||||
|
//crash
|
||||||
|
if (val3 == HIGH) {
|
||||||
|
for (int i=0; i<TV.hres(); i++) {
|
||||||
|
TV.print(i,44,F("cigarette"));
|
||||||
|
TV.select_font(font8x8ext);
|
||||||
|
TV.print(i,i,F("TTTTTTTTTTTTTT"));
|
||||||
|
TV.delay(200);
|
||||||
|
Serial.print("cigarette"); ////SEND TX
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//B4
|
||||||
|
//blinking
|
||||||
|
if (val4 == HIGH) {
|
||||||
|
TV.print(letters[random(0,letter)]);
|
||||||
|
TV.select_font(font4x6);
|
||||||
|
TV.print(10,10,F("good evening"));
|
||||||
|
TV.draw_rect(20,20,33,76,0,0);
|
||||||
|
TV.draw_line(20,20,33,76,1);
|
||||||
|
TV.clear_screen();
|
||||||
|
}
|
||||||
|
|
||||||
|
//B5
|
||||||
|
//RECEIVES TX
|
||||||
|
if (val5 == HIGH) {
|
||||||
|
TV.print((char)Serial.read());
|
||||||
|
TV.delay(20);
|
||||||
|
}
|
||||||
|
|
||||||
|
//B6
|
||||||
|
//alpha
|
||||||
|
if (val6 == HIGH) {
|
||||||
|
TV.print(letters[random(0,letter)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//B6
|
||||||
|
//TEXT OUT
|
||||||
|
if (val7 == HIGH) {
|
||||||
|
|
||||||
|
//SHUFFLE sentance
|
||||||
|
//int l = strlen(input);
|
||||||
|
//shuffle(input, l );
|
||||||
|
//TV.println(input);
|
||||||
|
//delay(100);
|
||||||
|
//Serial.print("SUN IS DOWN"); //TXT OUT
|
||||||
|
|
||||||
|
//SHUFFLE list/ times
|
||||||
|
for (int i = 0; i < 9; i++) {
|
||||||
|
strcpy_P(buffer, (char *)pgm_read_word(&(string_table[i])));
|
||||||
|
shuffle(buffer, strlen(buffer));
|
||||||
|
TV.print(buffer);
|
||||||
|
delay(100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(toggle_5 >500){
|
||||||
|
|
||||||
|
//P1
|
||||||
|
//map
|
||||||
|
int animal; //animals
|
||||||
|
animal = map(toggle_1, 10, 1023, 0, 3);
|
||||||
|
TV.print(animals[animal]);
|
||||||
|
delay(50);
|
||||||
|
|
||||||
|
if (toggle_1<10){
|
||||||
|
TV.select_font(font4x6);
|
||||||
|
TV.print(" ");
|
||||||
|
delay(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//P2
|
||||||
|
//string list
|
||||||
|
int BOB; //BOBZ
|
||||||
|
BOB = map(toggle_2, 0, 1023, 0, 6);
|
||||||
|
TV.print(BOBZ[BOB]);
|
||||||
|
TV.delay(50);
|
||||||
|
|
||||||
|
//P3
|
||||||
|
//map
|
||||||
|
int w1; //words
|
||||||
|
w1 = map(toggle_3, 0, 1023, 0, 3);
|
||||||
|
TV.print(words[w1]);
|
||||||
|
TV.delay(50);
|
||||||
|
|
||||||
|
//P6
|
||||||
|
//draw and text
|
||||||
|
|
||||||
|
|
||||||
|
if(toggle_6>0 & toggle_6<100 ){
|
||||||
|
TV.invert();
|
||||||
|
TV.print(10,10,F("stretched torso abs rocks "));
|
||||||
|
}
|
||||||
|
else if(toggle_6>100 & toggle_6<200){
|
||||||
|
TV.print(30,50,F("where are you going"));
|
||||||
|
delay(50);
|
||||||
|
}
|
||||||
|
else if(toggle_6>200 & toggle_6<300){
|
||||||
|
TV.select_font(font8x8ext);
|
||||||
|
TV.print(50,50,F("to step into a dark place"));
|
||||||
|
}
|
||||||
|
else if(toggle_6>350 & toggle_6<500){
|
||||||
|
TV.print(10,70,"need someone to play with");
|
||||||
|
}
|
||||||
|
else if(toggle_6>500 & toggle_6<1023){
|
||||||
|
|
||||||
|
TV.print("scratch");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//P7
|
||||||
|
//
|
||||||
|
//int p4;
|
||||||
|
//p4 = map(toggle_7, 0, 250, 0, 3);
|
||||||
|
//TV.print(part4[p4]);
|
||||||
|
//delay(100);
|
||||||
|
|
||||||
|
if (toggle_7>0 & toggle_7<500){
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
strcpy_P(buffer, (char *)pgm_read_word(&(string_table2[i])));
|
||||||
|
shuffle(buffer, strlen(buffer));
|
||||||
|
TV.print(buffer);
|
||||||
|
delay(300);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (toggle_7>500 & toggle_7<800){
|
||||||
|
TV.select_font(font8x8ext);
|
||||||
|
TV.print(30,10,F("lean on a car"));
|
||||||
|
}
|
||||||
|
else if (toggle_7>800 & toggle_7<1023){
|
||||||
|
//TV.select_font(font8x8ext);
|
||||||
|
TV.print("lean on a car");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//P5
|
||||||
|
//7777777...
|
||||||
|
else if(toggle_5 <100){
|
||||||
|
TV.print("7");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue