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 359 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

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


ESP32 - Stepper - LIDAR - Platform by jinx
[July 15, 2018, 04:58:51 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]


Robot Hive by jinx
[June 12, 2018, 03:58:03 AM]


Hi, Mushroom glue here. by Andrewsz
[June 11, 2018, 12:23:20 AM]


CZ-1 2.0: problems, calibration and printing, part2 by MEgg
[June 10, 2018, 06:10:53 AM]


Greetings! by Protowrxs
[June 05, 2018, 04:45:02 PM]


Raspberry Pi / Python eBook - free for the next 11 hours! by MEgg
[June 04, 2018, 05:21:07 PM]


All metal Titan Extruder by jinx
[May 27, 2018, 04:24:23 AM]


UConduit H-Bot printer design by KingBeetle
[May 26, 2018, 02:10:38 PM]

* Recent Posts

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


Re: Sloooow progress on the I3 clone by MEgg
[July 15, 2018, 08:44:53 AM]


Re: ESP32 - Stepper - LIDAR - Platform by jinx
[July 15, 2018, 04:58:51 AM]


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


Re: Sloooow progress on the I3 clone by jinx
[July 15, 2018, 03:46:18 AM]


Re: MKS Gen L 1.0 by KingBeetle
[July 14, 2018, 04:05:49 PM]


Re: Sloooow progress on the I3 clone by KingBeetle
[July 14, 2018, 11:13:35 AM]


Re: ESP32 - Stepper - LIDAR - Platform by 1 what
[July 14, 2018, 07:02:46 AM]


Re: Sloooow progress on the I3 clone by MEgg
[July 14, 2018, 05:38:34 AM]


Re: Sloooow progress on the I3 clone by KingBeetle
[July 14, 2018, 03:45:21 AM]


Re: ESP32 - Stepper - LIDAR - Platform by jinx
[July 14, 2018, 02:49:04 AM]


Re: ESP32 - Stepper - LIDAR - Platform by 1 what
[July 13, 2018, 10:03:12 PM]


Re: ESP32 - Stepper - LIDAR - Platform by Gareth
[July 13, 2018, 04:19:01 PM]


Re: ESP32 - Stepper - LIDAR - Platform by jinx
[July 13, 2018, 01:33:15 PM]


ESP32 - Stepper - LIDAR - Platform by Gareth
[July 13, 2018, 04:28:46 AM]