Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ST7032 QEI PS4Serial
Dependents: 2021Arobo_UMAPYOI 2021Arobo_YUMIPYOI
Revision 17:a5a5f1234eae, committed 2022-04-25
- Comitter:
- konagi
- Date:
- Mon Apr 25 09:11:37 2022 +0000
- Parent:
- 16:bba1ff6d196e
- Commit message:
- a
Changed in this revision
--- a/board.h Fri Oct 04 12:10:08 2019 +0900
+++ b/board.h Mon Apr 25 09:11:37 2022 +0000
@@ -20,20 +20,25 @@
};
-//QEI Enc[2] = {QEI(PC_6, PC_5, PC_8, 360), QEI(PA_11, PB_12, PA_12, 360)};
+QEI Enc[2] = {QEI(PC_6, PC_5, PC_8, 360), QEI(PA_11, PB_12, PA_12, 360)};
I2C i2c(PB_9,PB_8);
SB1602E lcd(i2c,"CERICA2 Hello!");
PS4Serial PS4(PA_9,PA_10);
+CERICA cerica(&i2c,TweLite);
-/*DigitalOut LED[5] = {
+DigitalOut LED[5] = {
PA_15, PB_7, PC_13, PC_2, PC_3
-};*/
+};
/*DigitalIn SW[4] = {
PC_0, PC_1, PB_0, PA_4
};*/
+DigitalIn SW1(PC_0);
+DigitalIn SW2(PC_1);
+DigitalIn SW3(PB_0);
+DigitalIn SW4(PA_4);
//DigitalOut dReset(PC_12);
@@ -43,10 +48,14 @@
{
printf("Board Initializing...\r"), fflush(stdout);
//for (int i = 0; i < 4; i++) SW[i].mode(PullUp);
- //for (int i = 0; i < 5; i++) LED[i] = 1;
+ SW1.mode(PullUp);
+ SW2.mode(PullUp);
+ SW3.mode(PullUp);
+ SW4.mode(PullUp);
+ for (int i = 0; i < 5; i++) LED[i] = 1;
//dReset = 1;
wait(0.5);
- //for (int i = 0; i < 5; i++) LED[i] = 0;
+ for (int i = 0; i < 5; i++) LED[i] = 0;
//dReset = 0;
printf("Board Initialized ! \r\n");
}
--- a/cerica2.cpp Fri Oct 04 12:10:08 2019 +0900
+++ b/cerica2.cpp Mon Apr 25 09:11:37 2022 +0000
@@ -1,6 +1,6 @@
#include "cerica2.h"
-CERICA::CERICA(WireSel WireSel_) :
+CERICA::CERICA(I2C *i2c_,WireSel WireSel_) :
wireSelect(PC_4),
i2c(PB_9,PB_8),
buz(PA_0),
--- a/cerica2.h Fri Oct 04 12:10:08 2019 +0900
+++ b/cerica2.h Mon Apr 25 09:11:37 2022 +0000
@@ -2,7 +2,6 @@
#include "mbed.h"
#include "QEI.h"
-
enum WireSel {FEP01,TweLite};
class CERICA
@@ -27,7 +26,7 @@
int maxSpd;
public:
- CERICA(WireSel WireSel_);
+ CERICA(I2C *i2c_,WireSel WireSel_);
// Board LED
bool LED(int n_,bool l_);