Simplebot_simple.c does not move well

BrickPi arrived the other day.
Although tried, it does not operate well.
Please give me advice.

Raspbian and wiringPi were installed in RaspberryPi.
wiringPi checked that performed examples/serialTest.c and the communication by UART operated.
The following commands were executed and operation of BrickPi was checked.

git clone
cd BrickPi_C/Project_Examples/simplebot
gcc -o simplebot_simple -lrt -lm -L/usr/local/lib -lwiringPi -I …/…/Drivers simplebot_simple.c
sudo ./simplebot_simple
BrickPiSetup: 0
BrickPiSetupSensors: -1

The return value of BrickPiRx of BrickPiSetupSensors of BrickPi.h is as follows.
It seems that timeout has occurred in processing of the following of BrickPiRx.
while(serialDataAvail(UART_file_descriptor) <= 0){
if(timeout && ((CurrentTickUs() - OrigionalTick) >= timeout))return -2;

It may be that BrickPi possibly has not answered.

Does preparation required for others occur?
Is there any method of checking that AtMega328 of BrickPi is operating?
Must the firmware of BrickPi possibly be written in?

Hello Nakano!

A few requests to try to troubleshoot what’s going on:

  • Does the LED example work?
  • Are you able to get the touch sensor sample to work?
  • Are you able to get the motor example to work?

This should troubleshoot out any hardware problems. If you’re getting a -2 response, you are not communicating with the BrickPi. This could be a problem with the RPi, and as you point out, it could be a problem with the BrickPi.

Did you follow the setup steps we have here: ?

Please note with this that you need to use our own version of wiringPi that runs at a faster baud rate.

Thank you.

“Modify your own image:” was overlooked.
The following setup is redone and the BrickPi came to operate.

The BrickPi worked with the following programs.

He can enjoy himself by BrickPi now.
Thank you very much.

Excellent, glad that worked!