NIT Fukui / CERICA_2

Dependencies:   ST7032 QEI PS4Serial

Committer:
Suzutomo
Date:
Fri Oct 05 08:11:37 2018 +0000
Revision:
3:72c7158376db
Child:
5:434332dbbfc5
iroirokaeta; iwamoto don't use my Liblary

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 3:72c7158376db 5
Suzutomo 3:72c7158376db 6 QEI Enc[2] = {QEI(PC_6, PC_5, PC_8, 360), QEI(PA_11, PB_12, PA_12, 360)};
Suzutomo 3:72c7158376db 7 I2C i2c(PB_9,PB_8);
Suzutomo 3:72c7158376db 8 SB1602E lcd(i2c,"hello");
Suzutomo 3:72c7158376db 9 PERICA perica(&i2c,0x10 << 1);
Suzutomo 3:72c7158376db 10 PS4Serial PS4(PA_9,PA_10);
Suzutomo 3:72c7158376db 11
Suzutomo 3:72c7158376db 12 const PinName GPIO[13] = {
Suzutomo 3:72c7158376db 13 PC_9,
Suzutomo 3:72c7158376db 14 PA_5,
Suzutomo 3:72c7158376db 15 PA_6,
Suzutomo 3:72c7158376db 16 PA_7,
Suzutomo 3:72c7158376db 17 PB_6,
Suzutomo 3:72c7158376db 18 PC_7,
Suzutomo 3:72c7158376db 19 PA_8,
Suzutomo 3:72c7158376db 20 PB_10,
Suzutomo 3:72c7158376db 21 PB_13,
Suzutomo 3:72c7158376db 22 PB_14,
Suzutomo 3:72c7158376db 23 PB_15,
Suzutomo 3:72c7158376db 24 PB_1,
Suzutomo 3:72c7158376db 25 PB_2
Suzutomo 3:72c7158376db 26 };
Suzutomo 3:72c7158376db 27
Suzutomo 3:72c7158376db 28 DigitalOut LED[5] = {
Suzutomo 3:72c7158376db 29 DigitalOut(PA_15),
Suzutomo 3:72c7158376db 30 DigitalOut(PB_7),
Suzutomo 3:72c7158376db 31 DigitalOut(PC_13),
Suzutomo 3:72c7158376db 32 DigitalOut(PC_2),
Suzutomo 3:72c7158376db 33 DigitalOut(PC_3)
Suzutomo 3:72c7158376db 34 };
Suzutomo 3:72c7158376db 35
Suzutomo 3:72c7158376db 36 DigitalIn SW[4] {
Suzutomo 3:72c7158376db 37 DigitalIn(PC_0),
Suzutomo 3:72c7158376db 38 DigitalIn(PC_1),
Suzutomo 3:72c7158376db 39 DigitalIn(PB_0),
Suzutomo 3:72c7158376db 40 DigitalIn(PA_4),
Suzutomo 3:72c7158376db 41 };
Suzutomo 3:72c7158376db 42
Suzutomo 3:72c7158376db 43 DigitalOut DevRst(PC_12);
Suzutomo 3:72c7158376db 44
Suzutomo 3:72c7158376db 45 void boardInit()
Suzutomo 3:72c7158376db 46 {
Suzutomo 3:72c7158376db 47 for (int i = 0; i < 4; i++) SW[i].mode(PullUp);
Suzutomo 3:72c7158376db 48 //if (perica.motor(0,0) = 1) ;
Suzutomo 3:72c7158376db 49 }