レンタルサーバーと連携したsakura.ioの運用例
Dependencies: mbed SakuraIO MPU9250_SPI BME280 gps AQM0802A
Revision 2:48e7e85cb169, committed 2018-11-27
- Comitter:
- punix
- Date:
- Tue Nov 27 06:51:52 2018 +0000
- Parent:
- 1:11957db1faa5
- Commit message:
- ??????
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 11957db1faa5 -r 48e7e85cb169 main.cpp --- a/main.cpp Thu Nov 22 08:09:12 2018 +0000 +++ b/main.cpp Tue Nov 27 06:51:52 2018 +0000 @@ -46,7 +46,11 @@ mpu9250_spi mpu9250(internal_mpu9250_spi, SPI_MPU_CS); // sakura.io -SakuraIO_I2C sakuraio(I2C_SDA, I2C_SCL); +//SakuraIO_I2C sakuraio(I2C_SDA, I2C_SCL); +#define SPI_FREQ (350000) +SPI sakuraio_spi(PB_15, PB_14, PB_13); +DigitalOut sakuraio_cs(PB_12); +SakuraIO_SPI sakuraio(sakuraio_spi, sakuraio_cs); SensorData sensor_data; @@ -63,9 +67,9 @@ void gps_uart_buffering_handler(); -const int SEND_INTERVAL_TICKS_PAR_COUNT = 25; +const int SEND_INTERVAL_TICKS_PAR_COUNT = 1500; -const int RETRY_INTERVAL_TICKS_PAR_COUNT = 25; +const int RETRY_INTERVAL_TICKS_PAR_COUNT = 50; void setup() {