NIT Fukui / CERICA_2

Dependencies:   ST7032 QEI PS4Serial

Committer:
Suzutomo
Date:
Wed Dec 05 02:25:44 2018 +0000
Revision:
11:8fa43cb31f9b
Parent:
10:45cc90a9ec34
Child:
12:9d099f3d2a3b
kari

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Suzutomo 3:72c7158376db 1 #include "SB1602E.h"
Suzutomo 11:8fa43cb31f9b 2 //#include "perica3.h"
Suzutomo 3:72c7158376db 3 #include "QEI.h"
Suzutomo 3:72c7158376db 4 #include "PS4Serial.h"
Suzutomo 5:434332dbbfc5 5 #include "cerica2.h"
Suzutomo 3:72c7158376db 6
Suzutomo 6:6c3c49d45b98 7 QEI Enc[2] = {QEI(PC_6, PC_5, PC_8, 360), QEI(PA_11, PB_12, PA_12, 360)};
Suzutomo 3:72c7158376db 8 I2C i2c(PB_9,PB_8);
Suzutomo 11:8fa43cb31f9b 9 SB1602E lcd(i2c,"CERICA2\nHello!");
Suzutomo 11:8fa43cb31f9b 10 //PERICA perica(&i2c,0x10 << 1);
Suzutomo 7:c46745e98264 11 PS4Serial PS4(PA_9,PA_10);
Suzutomo 3:72c7158376db 12
Suzutomo 3:72c7158376db 13 const PinName GPIO[13] = {
Suzutomo 3:72c7158376db 14 PC_9,
Suzutomo 3:72c7158376db 15 PA_5,
Suzutomo 3:72c7158376db 16 PA_6,
Suzutomo 3:72c7158376db 17 PA_7,
Suzutomo 3:72c7158376db 18 PB_6,
Suzutomo 3:72c7158376db 19 PC_7,
Suzutomo 3:72c7158376db 20 PA_8,
Suzutomo 3:72c7158376db 21 PB_10,
Suzutomo 3:72c7158376db 22 PB_13,
Suzutomo 3:72c7158376db 23 PB_14,
Suzutomo 3:72c7158376db 24 PB_15,
Suzutomo 3:72c7158376db 25 PB_1,
Suzutomo 3:72c7158376db 26 PB_2
Suzutomo 3:72c7158376db 27 };
Suzutomo 3:72c7158376db 28
Suzutomo 3:72c7158376db 29 DigitalOut LED[5] = {
Suzutomo 11:8fa43cb31f9b 30 PA_15, PB_7, PC_13, PC_2, PC_3
Suzutomo 3:72c7158376db 31 };
Suzutomo 3:72c7158376db 32
Suzutomo 3:72c7158376db 33 DigitalIn SW[4] {
Suzutomo 11:8fa43cb31f9b 34 PC_0, PC_1, PB_0,PA_4
Suzutomo 3:72c7158376db 35 };
Suzutomo 3:72c7158376db 36
Suzutomo 6:6c3c49d45b98 37 //DigitalOut DevRst(PC_12);
Suzutomo 3:72c7158376db 38
Suzutomo 3:72c7158376db 39 void boardInit()
Suzutomo 3:72c7158376db 40 {
Suzutomo 3:72c7158376db 41 for (int i = 0; i < 4; i++) SW[i].mode(PullUp);
Suzutomo 10:45cc90a9ec34 42 for (int i = 0; i < 5; i++) LED[i] = 1;
Suzutomo 10:45cc90a9ec34 43 wait(1);
Suzutomo 10:45cc90a9ec34 44 for (int i = 0; i < 5; i++) LED[i] = 0;
Suzutomo 3:72c7158376db 45 }