Page 1 of 2
How to.... interface the RPi with spirit board
Posted: Mon Nov 27, 2017 1:26 am
by mgodiya
Re: How to.... interface the RPi with spirit board
Posted: Tue Nov 28, 2017 1:28 am
by Kevin
As soon as we finish shipping I'll have a proper guide with a library for the Pi so everyone can start to really play with this. Thanks for sharing!!
-Kevin
Re: How to.... interface the RPi with spirit board
Posted: Sun Dec 03, 2017 2:39 pm
by odinshen
Thanks for your share, mgodiya
I had tried today, sometime I can send buzzer command from Python, but more of time I saw IOError message during the 1st I2C command, have you saw that also? Any idea?
Traceback (most recent call last):
File "sr_python_test.py", line 49, in <module>
writeByte(serv_values[x%3],reg_serv_values[x%3])
File "sr_python_test.py", line 17, in writeByte
bus.write_byte_data(address,reg_val,value)
IOError: [Errno 121] Remote I/O error
Re: How to.... interface the RPi with spirit board
Posted: Tue Dec 05, 2017 2:35 am
by Kevin
The Pi's I2C hardware has some bugs. This is apparently related to the chip used on the Pi and it caused all kinds of problems and hassles getting things to work correctly. For most of the Pi to Pic I2C communications, we need to add a slight delay (I think it's a few microseconds if I remember correctly) before the PIC responds back. There is a function in the library we wrote to deal with this and only needs to be called once. This together with the rest of the pre-written functions in our Python library makes all the coms real easy. I'm going to get that posted with some instructions soon. Almost done shipping these guys. That's the big focus right now then we'll have the Pi stuff posted. Hang in there. It should work smoothly once that's posted.
Thanks!
-Kevin
Re: How to.... interface the RPi with spirit board
Posted: Wed Dec 06, 2017 12:50 am
by mgodiya
Thanks for the details Kevin, we are patiently waiting for your python library.
Meanwhile odinshen, you could try the following to make the above script work.
1. Make sure you are following the steps above correctly despite my poor formatting
2. Make sure I2C and SPI are enabled on the Pi
3. As Kevin mentioned, try uncommenting the 3 lines in the script (it will give the pi more time to respond)
let me know how you make out.
Sorry for the late reply.
PS:I am pretty sure your problem can be solved using 1st or/and 2nd solutions.
Re: How to.... interface the RPi with spirit board
Posted: Thu Dec 14, 2017 11:33 am
by Astroghost
Hi all,
Have a special robotic day in ower Fablab tomorrow , , i was expecting that we get all information from Kevin to control the robot by BLE and remote controller , but nothing come at this day.
Bad news that i would not be able to present the spirit rover
Do someone know how to send data to serial via BLE , i've actually programmed the HC-06 BLE module to work at 57600 and connecting it with my smartphone , but spirit rover don"t received the command i send.
Re: How to.... interface the RPi with spirit board
Posted: Mon Jan 22, 2018 3:41 am
by esba1ley
Does anyone have a list of what's available at what addresses on the i2c in addition to what was in the python test code above? A handy reference would be nice...
Re: How to.... interface the RPi with spirit board
Posted: Sun Jan 28, 2018 6:09 am
by esba1ley
Also, what frequency is the i2c bus running at? It seems to be higher than 100kHz based on what I'm seeing with pigpiod and piscope, which can only sample the gpio at 1 microsecond... I'm also seeing 20Hz activity on the I2C pins (2 and 3) on the RasPI...
Re: How to.... interface the RPi with spirit board
Posted: Mon Jan 29, 2018 8:34 am
by esba1ley
Re: How to.... interface the RPi with spirit board
Posted: Wed Jan 31, 2018 6:54 pm
by gpvillamil
This is very cool. So you're using I2C to talk directly to the PIC processor?
I was poking around the Arduino sketch, and it looks like you can probably use SPI to go from the Pi to the Arduino, and then use the existing Arduino libraries. You could probably do all the code for easing/simultaneous moves on the Arduino, I think.
It looks like the missing piece of the puzzle is just some libraries on the Pi side to send commands over SPI.