mukuyo hirohashi
/
Rasp_serial
raspberry pi to stm32f303k8 for serial communication
Diff: serial/serial.h
- Revision:
- 0:7bc24e8d1591
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/serial/serial.h Sun May 02 15:01:33 2021 +0000 @@ -0,0 +1,19 @@ +#pragma once +#include "mbed.h" + +class Rasp { +public: + Rasp(PinName TX,PinName RX); + void dev_rx(); + void put(int val); + void get(float &a, int num); + + int rx_val,ID,u,vel_norm,vel_theta,flag,DKpow; + float omega; +private: + int BUFFER_SIZE,val_1,val_2; + int buffer[100]; + float Motor_pow[4]; + float motor_limit; + RawSerial device; +};