collapse

Welcome!



Welcome to Robot Rebels, an online robot maker community.

Register today to post your projects, ask questions, share knowledge and meet like-minded people from around the world.


The RobotRebel.org Community

Author Topic: I2C Setup for Raspberry Pi Zero W with Arch Linux  (Read 486 times)

Ladvien

  • Alabtu-ian Refugee
  • Member
  • *
  • Posts: 57
I2C Setup for Raspberry Pi Zero W with Arch Linux
« on: March 30, 2018, 09:35:16 PM »

This article builds on the previous, where I ran us through setting up Arch Linux for the Raspberry Pi Zero W.

Let's not stop, let's get I2C going so we can interact with some cool hardware.


1. Install needed packages
Code: [Select]
pacman -S git python2 i2c-tools base-devel python2-distribute python2-pipUse Python's Package Index (pip) to install Raspberry Pi GPIO support

Code: [Select]
pip2 install RPi.GPIO2. Install raspi-config
Code: [Select]
sudo pacman -S xorg-xrandr libnewt
git clone https://aur.archlinux.org/raspi-config.git
cd raspi-config
makepkg -i
Use the Raspi-Config tool to enable I2C
Code: [Select]
sudo raspi-config


Select "Interfacing Options" and enable I2C.

Note: Going back through these instructions I did notice when I started
Code: [Select]
raspi-config I received this warning:

Code: [Select]
/usr/bin/raspi-config: line 997: warning: command substitution: ignored null byte in input
And when I attempted to enable I2C it gave this error.

Code: [Select]
* Failed to read active DTB
But it still seemed to do the job. I'll investigate more when I've time.


3. Test the I2C Setup
We _should_ be all setup.  Try running
Code: [Select]
sudo i2cdetect -y 1If all has went well then you should get
Code: [Select]
[alarm@alarmpi ~]$ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Now, we just need to connect an I2C device to the bus and we should the hex address of where the device may be found.

 

* Search


* Recent Topics

Gordon McComb Passes by jinx
[September 18, 2018, 02:12:53 AM]


sdsds by jinx
[September 16, 2018, 04:11:16 AM]


1B1 -- RAN Stack by Protowrxs
[September 12, 2018, 05:35:59 PM]


Picture Topic by Underwooz
[September 05, 2018, 12:27:28 AM]


ESP32 - Stepper - LIDAR - Platform by ZeroMax
[August 25, 2018, 06:48:32 PM]


NASA bot by ossipee
[August 05, 2018, 06:52:36 PM]


Android Adware by Pittmanz
[July 24, 2018, 12:40:23 AM]


Greetings! by Pittmanz
[July 24, 2018, 12:39:20 AM]


Sloooow progress on the I3 clone by KingBeetle
[July 16, 2018, 04:20:59 AM]


MKS Gen L 1.0 by jinx
[July 15, 2018, 03:55:57 AM]


Motor rewinding machine by 1 what
[July 10, 2018, 06:03:46 PM]


All the stories in the forum are most important. by ZeroMax
[July 01, 2018, 09:44:53 PM]


Parallax CR Servo with Built-In Encoder by 1 what
[June 28, 2018, 12:13:32 PM]


He's Back...BoB V3.0 by k120189
[June 21, 2018, 07:03:17 PM]


Funding by MEgg
[June 21, 2018, 04:34:36 PM]

* Recent Posts

Re: Gordon McComb Passes by jinx
[September 18, 2018, 02:12:53 AM]


Gordon McComb Passes by erco
[September 17, 2018, 10:00:37 PM]


Re: sdsds by jinx
[September 16, 2018, 04:11:16 AM]


sdsds by sdsds
[September 15, 2018, 03:55:20 PM]


Re: 1B1 -- RAN Stack by Protowrxs
[September 12, 2018, 05:35:59 PM]


Re: Picture Topic by Underwooz
[September 05, 2018, 12:27:28 AM]


Re: 1B1 -- RAN Stack by tinhead
[August 27, 2018, 04:06:01 PM]


Re: 1B1 -- RAN Stack by Bajdi
[August 27, 2018, 09:58:53 AM]


Re: 1B1 -- RAN Stack by ZeroMax
[August 25, 2018, 06:53:15 PM]


Re: ESP32 - Stepper - LIDAR - Platform by ZeroMax
[August 25, 2018, 06:48:32 PM]


NASA bot by ossipee
[August 05, 2018, 06:52:36 PM]


Updates 20180728 :- new Steppers - Perfboard Migration - wheel inserts by Gareth
[July 28, 2018, 09:57:11 AM]


Re: Android Adware by Pittmanz
[July 24, 2018, 12:40:23 AM]


Re: Greetings! by Pittmanz
[July 24, 2018, 12:39:20 AM]


Re: Sloooow progress on the I3 clone by KingBeetle
[July 16, 2018, 04:20:59 AM]