Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

i2c-swift-example

This repository demonstrates how to control I2C devie with Swift. The library page is here.

  • Sources/I2CDetect: Detect I2C Device on the bus
  • Sources/I2CDeviceModule: Some I2C module driver library, LED and sensors...
  • Sources/Counter: Counter demo for LED 8Seg module (ZT.SEG8B4A036A)
  • Sources/LightSens: Ambient Light Sensor demo (BH1750)
  • Sources/LightSensDisplay: Combine with LED and light sensor the above
  • Sources/AirPressureSens: Air Pressure Sensor demo (BMP180)
  • Sources/AirPressureSensDisplay: Combine with LED and air pressure sensor
  • Sources/HumiditySens: Humidity Sensor demo (SHT21)

Supported Platform

  • I2CTinyUSB adapter (Mac)
  • I2C Kernel device (/dev/i2c-*) (Linux, Raspberry Pi etc...)

Building

Install libusb package.

macOS

$ brew install libusb-compat libusb

Linux(Ubuntu 16.04)

$ sudo apt-get install i2c-tools libi2c-dev

Build library and its demo.

make debug

On Linux, you should probably run the demo with sudo.

sudo .build/debug/I2CDetect

About

Use I2C bus device with Swift

Topics

Resources

License

Releases

No releases published
You can’t perform that action at this time.