Giter Site home page Giter Site logo

arduino___serial_to_i2c_bridge's Introduction

Overview

This project implements a serial-to-i2c bridge.

Hardware configuration

The figure below shows an example system configuration. On the left, there is a PC host device, which has a serial port or USB-to-serial adapter. The PC host is then connected to an Arduino-compatible device that has been flashed with the compiled firmware from this project (i.e., serial_to_i2c_bridge.hex). This Arduino-device is labelled as Serial-to-i2c-bridge in the figure. Other Arduino-compatible devices _(labelled Device 1-Device N in the figure) may then be connected to the same i2c bus as the Serial-to-i2c-bridge.

In this configuration, any bytes written to the serial connection by the PC host are read by the Serial-to-i2c-bridge and are immediately written to the i2c bus as a broadcast message. Furthermore, the byte contents of any broadcast message written to the i2c bus by any device other than the Serial-to-i2c-bridge device are read by the Serial-to-i2c-bridge device and are immediately written through the serial connection to the PC host.

N.B. To test the bridge:

  • Flash the serial_to_i2c_bridge.hex file to a second device connected to the i2c bus.
  • Open a serial terminal on the serial port connected to the second device, using a baud-rate of 115200.

If things are connected correctly, any bytes written to the first Serial-to-i2c-bridge device should be displayed in the serial prompt connected to the second device.

                                          i2c bus
 ____________        _____________          ||         ____________
 |          |        | Serial-to  |         ||         |          |
 | PC host  |<======>| i2c-bridge |<=======>||<=======>| Device 1 |
 |__________|   ^    |____________|         ||         |__________|
                |                           ||
              Serial                        ||         ____________
            connection                      ||         |          |
                                            ||<=======>| Device 2 |
                                            ||         |__________|
                                            ||              .
                                            ||              .
                                            ||              .
                                            ||         ____________
                                            ||         |          |
                                            ||<=======>| Device N |
                                            ||         |__________|

Build instructions

To compile and flash to an Uno-compatible Arduino device, run:

scons ARDUINO_BOARD=uno ARDUINO_PORT=<serial port name, e.g., "COM1", > upload

To compile and flash to a Diecimila-compatible or a Duemilanove-compatible Arduino device, run:

scons ARDUINO_BOARD=atmega328 ARDUINO_PORT=<serial port name, e.g., "COM1", > upload

Credits

Copyright 2013 Christian Fobel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.