//左から3番目のGNDもつなぐ #define BUSY 4 //4pin #define DOUT 5 //5pin #define ACK 6 //9pin #define SEL2 7 //10pin byte str[300]; void setup() { pinMode(ACK, INPUT); pinMode(DOUT, OUTPUT); pinMode(BUSY, OUTPUT); pinMode(SEL2, OUTPUT); printBuffer("Helo World"); for(int i=32; i<256; i++) str[i] = i; str[256] = 0; printBuffer(&str[32]); } void loop() { // put your main code here, to run repeatedly: } void printBuffer(byte *buff) { int ix = 0; byte count = 0; byte b; int mod; do { b = buff[ix++]; ++count; } while(b > 0); --count; //文字数 digitalWrite(SEL2, HIGH); delayMicroseconds(1000); ix = 0; //24文字(1行)にそろえる for(int i=0; i<(count / 24); i++) { for(int j=0; j<24; j++) { sendByte(buff[ix++]); } sendByte(13); delay(500); } //24文字以内の余った文字を左詰めで表示 mod = count % 24; if(mod != 0) { for(int i=0; i