Skip to content

BYOM: peripherals

octaexon edited this page Jan 8, 2020 · 3 revisions

Camera setup

We need to enable the camera interface.

  • The simplest way is to run the configuration script:
sudo raspi-config

Interfacing Options -> Camera -> Enable.

  • To the equivalent from the command line:
echo "start_x=1" | sudo tee -a /boot/config.txt
echo "gpu_mem=128" | sudo tee -a /boot/config.txt

PWM setup

We need to set up the i2c bus in order to interface with the PWM.

  • Install the necessary dependencies:
sudo apt-get install -y python-smbus i2c-tools
  • Enable the interface in the configuration helper:
sudo raspi-config

Interfacing Options -> I2C -> Enable Then reboot and reconnect.

  • As another check (if the PWM is connected):
sudo i2cdetect -y 1

should return should returns some signals, for example:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

Joystick bluetooth setup

While joining