コントローラーのプログラム

Dependencies:   mbed

/media/uploads/Raccoon/controller.jpg

Revision:
2:6383151eb64b
Parent:
1:a213bf47cc4d
--- a/main.cpp	Tue Dec 26 01:25:07 2017 +0000
+++ b/main.cpp	Tue Dec 26 01:26:52 2017 +0000
@@ -17,7 +17,7 @@
 Ticker Tr_timer;
 uint8_t data[MAX];
 
-/*情報源符号化(data-5bit, index-3bitにして符号化)*/
+/*符号化(*/
 uint8_t ChannelCoding(float data_f, int index)
 {
     uint8_t tmp;
@@ -51,7 +51,7 @@
 }
 
 int main() {
-    for(int i=0; i<MAX; i++)data[i] = ChannelCoding(0.0f, i);//配列dataを初期化
+    for(int i=0; i<MAX; i++)data[i] = ChannelCoding(0.0f, i);
     myled = 0;
     sw_0.mode(PullUp);
     sw_1.mode(PullUp);
@@ -60,6 +60,6 @@
     xbee.format(8, Serial::None, 1);
     xbee.attach(&receve, Serial::RxIrq);//受信割り込み
     Tr_timer.attach_us(&transmit, 20000);//送信
-    adc_timer.attach_us(&adcRead, 20000);//ADC用
+    adc_timer.attach_us(&adcRead, 20000);//ADC
     while(1)__WFI();
 }
\ No newline at end of file