Skip to content

Sample codes for driving different hardware with Raspberry Pi

Notifications You must be signed in to change notification settings

AS4SR/RPI_drivers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPI_drivers

Sample codes for driving different hardware with Raspberry Pi
The name of the original package is commu

Hardware

Raspberry Pi Zero Wireless

PCA9685 I2C 16 Channels PWM driver

MPU 9250 9 Axes Accelerometer

TCA9548A 8 Channels I2C Multiplexer

28015 REV C PING))) Ultrasonic Distance Sensor

Software

Raspberry Pi

Raspbian Jessie Lite
ROS packages:

  • rospy
  • roscpp
  • roslaunch
  • sensor_msgs
  • std_msgs
  • visualization_msgs
  • tf

PC

putty: https://www.putty.org/
Winscp: https://winscp.net/eng/index.php
Advanced IP Scanner: https://www.advanced-ip-scanner.com/
Win32DiskImager: https://sourceforge.net/projects/win32diskimager/

Relvant Links

Raspberry Pi headless setup: https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0
I2C setup: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

Relvant Issues

WIFI setup:

  • Add the following lines to /etc/wpa_supplicant/wpa_supplicant.conf:
network={
ssid="MySSID"
psk="MyPsk"
key_mgmt=WPA-PSK
}
  • Add the following lines to /etc/network/interfaces(for auto conntection, not default for Raspbian Stretch):
auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Show all connected I2C devices:

$ sudo i2cdetect -y

Make the scripts executable:

$ chmod +x something.py

Show ip address:

$ ifconfig

Install smbus2:

$ sudo apt-get install -y python2-pip
$ sudo pip install smbus2

To add new ros packages, follow the section 4.2 in this link:
http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi

GPIO for Raspberry pi 3 and pi zero w:
(Source page: http://www.raspberry-pi-geek.com/howto/GPIO-Pinout-Rasp-Pi-1-Model-B-Rasp-Pi-2-Model-B)
raspib-gpio_lightbox

About

Sample codes for driving different hardware with Raspberry Pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.8%
  • CMake 25.7%
  • C++ 16.5%