#include <Wire.h>
#include <ST7032.h>
#include <PS2Keyboard_stm32.h>
const int DataPin = 8;
const int IRQpin = 3;
PS2Keyboard keyboard;
ST7032 lcd;
int x, y;
void setup() {
// put your setup code here, to run once:
keyboard.begin(DataPin, IRQpin);
lcd.begin(16,2);
lcd.setContrast(60);
lcd.clear();
}
void loop() {
char c;
// put your main code here, to run repeatedly:
if (keyboard.available()) {
c = keyboard.read();
lcd.setCursor(x, y);
lcd.write(c);
x++;
if (x > 15) {
x = 0;
y++;
if (y > 1) {
y = 0;
}
}
}
}
リビングの整理棚を組み立てた April 28, 2024
ワイヤレスイヤホンを修理した April 23, 2024
溶岩腕時計を修理(?)した April 13, 2024
PR
Keyword Search
Comments