This is application for communicate with robot on RPi base with Amur distribution board.
- CMake - for install read: https://snapcraft.io/install/cmake/raspbian
- Protobuf & gRPC - for install read: https://grpc.io/docs/languages/cpp/quickstart/ need install in system(/usr/local)
- PiGPIO - for install read: http://abyz.me.uk/rpi/pigpio/download.html
- libconfig - for install:
sudo apt-get install libconfig++-dev -y
- GStreamer (not used, will be added in the future)
git clone https://github.com/ARDev1161/AmurClient.git --recurse-submodules
cd AmurClient
mkdir bin && cd bin
cmake -DCMAKE_BUILD_TYPE=Release -DGRPC_FETCHCONTENT=OFF ../
cmake --build . -- -j4
- Camera - OV5647
- Inertial sensor - MPU-9250
- Encoders wheel: left, right - HOA0901
- Encoders hand internal: left, right - HOA0901
- Encoders hand outter: left, right - HOA0901
- ADC module - ADS1115(address - 0x48)
- RTC module - DS3231(address - 0x68) with AT24C32(address - 0x57)
- Barometer - BMP-280
- Battery voltage
- ServoX, ServoY - MG90S
- Motor wheel: left, right
- Motor hand internal: left, right
- Motor hand outter: left, right
- GPIO4 - Data from 74HC165
- GPIO17 - Clk 74HC165
- GPIO18 - Not master reset 74HC595
- GPIO27 - SH/Not(LD) 74HC165
- GPIO22 - Clk inh 74HC165
- GPIO23 - Data to 74HC595
- GPIO24 - SHcp 74HC595
- GPIO25 - STcp 74HC595
- GPIO5 - freePin 3
- GPIO6 - freePin 4
- GPIO12 - PWM1 right
- GPIO13 - PWM1 left
- GPIO19 - freePin 1
- GPIO16 - Not OE 74HC595
- GPIO26 - freePin 2
- GPIO20 - PWM2 right
- GPIO21 - PWM2 left
Use for LoRa(SX1278)
- GPIO19 - Rx enable
- GPIO26 - Tx enable
- GPIO5 - DI0
- GPIO6 - Reset
Use for LoRa(SX1278)
- CE1
- CE0
- SCLK
- MISO
- MOSI
Use for ADS1115
- Vpd
- SCL
- SDA
- GND
- Vpd
- Tx
- Rx
- GND
- Left - 3.3V
- Right - 5V
bites trancieve in register from last to first: from 16 to 1
(First byte - right)
- 1bit - right relay
- 2bit - clk2 right motor shield (Hand right motor - A2 input)
- 3bit - clk1 right motor shield (Wheel right motor - A1 input)
- 4bit - cnt1 right motor shield (Wheel right motor - B1 input)
- 5bit - cnt2 right motor shield (Hand right motor - B2 input)
- 6bit - en1 right motor shield (Wheel right motor)
- 7bit - en2 right motor shield (Hand right motor)
- 8bit - right LED light
(Second byte - left)
- 9bit - left relay
- 10bit - clk2 left motor shield (Wheel left motor - A2 input)
- 11bit - clk1 left motor shield (Hand left motor - A1 input)
- 12bit - cnt1 left motor shield (Hand left motor - B1 input)
- 13bit - cnt2 left motor shield (Wheel left motor - B2 input)
- 14bit - en1 left motor shield (Hand left motor)
- 15bit - en2 left motor shield (Wheel left motor)
- 16bit - left LED light
bites recieve by register from first to last: from 1 to 16
(First byte - right)
- 1bit - LR2B encoder (Hand outer right encoder - B signal)
- 2bit - LR1B encoder (Hand internal right encoder - B signal)
- 3bit - LL2B encoder (Hand outer left encoder - B signal)
- 4bit - LL1B encoder (Hand internal left encoder - B signal)
- 5bit - LL1A encoder (Hand internal left encoder - A signal)
- 6bit - LL2A encoder (Hand outer left encoder - A signal)
- 7bit - LR1A encoder (Hand internal right encoder - A signal)
- 8bit - LR2A encoder (Hand outer right encoder - A signal)
(Second byte - left)
- 9bit - freeInPin
- 10bit - freeInPin
- 11bit - freeInPin
- 12bit - freeInPin
- 13bit - R1A encoder (Wheel left encoder - A signal)
- 14bit - R1B encoder (Wheel left encoder - B signal)
- 15bit - R2B encoder (Wheel right encoder - B signal)
- 16bit - R2A encoder (Wheel right encoder - A signal)