Skip to content

A USB-to-I2C dongle firmware, turning an Arduino UNO into an I2C bridge for interacting with I2C devices from your computer..

Notifications You must be signed in to change notification settings

augustbering/arduino-i2c-dongle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Arduino I2C Dongle

A USB dongle firmware, turning an Arduino UNO into an I2C bridge.

Syntax is influenced by that of i2ctools for Linux embedded systems.

Building

Build with platformio, download here: http://www.platformio.org Platformio also flashes the firmware. Just plug in your UNO and type "platformio" in your shell and everything should work.

Usage

Connect to the virtual com port of your UNO with a terminal program (like minicom on Linux). 115200 baud.

Typing "help" should display this:

Usage:
 Reading
 read <i2c device address> <register address> <length>

 Writing
 write <i2c device address> <register address> <data byte 1> <data byte 2> ...

 Toggle echo (default is "on")
 echo (toggles echo)

 Display this help
 help

 All numbers can be in dec, oct (prefix 0) or hex (prefix 0x) format.

 i2c device address is in 7 bit format

 Commands can be shorted to just the first letter.

 NOTE: If <register address> is more than 2 characters it will be interpreted as a 16 bit address and 16 bit addressing will
 be used. For example the AT24CS32 eeprom uses this adressing mode.

 Example writing:
 > w 0x50 0 10 1 2 5
 Writes 4 bytes to address 0 of an eeprom memory (0x50 is standard address for 24cxx memories)
 Output:
 OK

 Example reading:
 > r 0x50 0 10
 Reads 10 bytes from address 0 of that same eeprom.
 Output:
 OK(hex) a,1,2,5,1,0,0,2,0,0,

About

A USB-to-I2C dongle firmware, turning an Arduino UNO into an I2C bridge for interacting with I2C devices from your computer..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%