This page (revision-10) was last changed on 2021-06-19 07:56 by Murray Altheim

This page was created on 2020-04-30 09:37 by Murray Altheim

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
10 2021-06-19 07:56 5 KB Murray Altheim to previous
9 2020-05-25 07:26 5 KB Murray Altheim to previous | to last
8 2020-05-24 09:48 5 KB Murray Altheim to previous | to last
7 2020-04-30 11:06 5 KB Murray Altheim to previous | to last
6 2020-04-30 10:34 4 KB Murray Altheim to previous | to last
5 2020-04-30 10:33 4 KB Murray Altheim to previous | to last
4 2020-04-30 10:24 4 KB Murray Altheim to previous | to last
3 2020-04-30 10:13 3 KB Murray Altheim to previous | to last
2 2020-04-30 10:06 3 KB Murray Altheim to previous | to last
1 2020-04-30 09:37 2 KB Murray Altheim to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 3 changed one line
I based this experiment on an article found on ''The Robotics Back-End'' (see References below), but have modified it to use Python rather than C on the Raspberry Pi, since that's the main language I've been using to write the operating system of the [KR01] robot.
I based this experiment on an article found on ''The Robotics Back-End'' (see References below), but have modified it to use Python rather than C on the Raspberry Pi, since that's the main language I've been using to write the operating system of the [KR01] robot. Some of the ideas I found online tended to lock up the I2C bus or cause other kinds of problems. When I stumbled onto an example using the WiringPi library things seemed to even out.
At line 6 changed one line
[WiringPi-Python|https://github.com/WiringPi/WiringPi-Python] library. This can be installed via:
[WiringPi-Python|https://github.com/WiringPi/WiringPi-Python] library.
WiringPi (both C++ and Python versions) has an I2C class to provide communication over I2C. The basic API is as follows:
At line 10 added 26 lines
class I2C(object):
def setupInterface(self,*args):
return wiringPiI2CSetupInterface(*args)
def setup(self,*args):
return wiringPiI2CSetup(*args)
def read(self,*args):
return wiringPiI2CRead(*args)
def readReg8(self,*args):
return wiringPiI2CReadReg8(*args)
def readReg16(self,*args):
return wiringPiI2CReadReg16(*args)
def write(self,*args):
return wiringPiI2CWrite(*args)
def writeReg8(self,*args):
return wiringPiI2CWriteReg8(*args)
def writeReg16(self,*args):
return wiringPiI2CWriteReg16(*args)
}}}
In particular, we can expect to be using the {{wiringPiI2CRead()}} and {{wiringPiI2CWrite()}} methods.
!! Raspberry Pi Installation
WiringPi for Python can be installed via:
{{{
At line 39 added 3 lines
!! Arduino Installation