NIT Fukui / CERICA_2

Dependencies:   ST7032 QEI PS4Serial

Committer:
Suzutomo
Date:
Sat Oct 06 00:10:58 2018 +0000
Revision:
7:c46745e98264
Parent:
6:6c3c49d45b98
Child:
10:45cc90a9ec34
?????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Suzutomo 3:72c7158376db 1 #include "SB1602E.h"
Suzutomo 3:72c7158376db 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 3:72c7158376db 9 SB1602E lcd(i2c,"hello");
Suzutomo 3:72c7158376db 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 3:72c7158376db 30 DigitalOut(PA_15),
Suzutomo 3:72c7158376db 31 DigitalOut(PB_7),
Suzutomo 3:72c7158376db 32 DigitalOut(PC_13),
Suzutomo 3:72c7158376db 33 DigitalOut(PC_2),
Suzutomo 3:72c7158376db 34 DigitalOut(PC_3)
Suzutomo 3:72c7158376db 35 };
Suzutomo 3:72c7158376db 36
Suzutomo 3:72c7158376db 37 DigitalIn SW[4] {
Suzutomo 3:72c7158376db 38 DigitalIn(PC_0),
Suzutomo 3:72c7158376db 39 DigitalIn(PC_1),
Suzutomo 3:72c7158376db 40 DigitalIn(PB_0),
Suzutomo 3:72c7158376db 41 DigitalIn(PA_4),
Suzutomo 3:72c7158376db 42 };
Suzutomo 3:72c7158376db 43
Suzutomo 6:6c3c49d45b98 44 //DigitalOut DevRst(PC_12);
Suzutomo 3:72c7158376db 45
Suzutomo 3:72c7158376db 46 void boardInit()
Suzutomo 3:72c7158376db 47 {
Suzutomo 3:72c7158376db 48 for (int i = 0; i < 4; i++) SW[i].mode(PullUp);
Suzutomo 3:72c7158376db 49 //if (perica.motor(0,0) = 1) ;
Suzutomo 3:72c7158376db 50 }