GithubHelp home page GithubHelp logo

yona75 / rafti2c Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robdobsn/rafti2c

0.0 0.0 0.0 15.61 MB

License: MIT License

C++ 78.17% Python 2.95% C 0.16% TypeScript 14.10% CSS 0.94% HTML 2.33% CMake 1.13% Dockerfile 0.21%

rafti2c's Introduction

RaftI2C

RaftI2C is part of the Raft opinionated framework for the Espressif ESP32 family. For more details about Raft see https://github.com/robdobsn/RaftCore/wiki

This is the I2C component of Raft which provides:

  • I2CCentral - a component which replaces the standard I2C master functionality on ESP32 with a more robust implementation
  • BusI2C - a Raft SysMod which implements an advanced I2C bus with automated scanning, detection, identification, initialization and polling of connected I2C devices. BusI2C also supports multiplexers (PCA9548A) and power control to individual I2C multiplexed slots.

A blog post is available which explains how device auto-identification works.

Example web-app

The example app, TestWebUI, is a complete web-based application which uses BusI2C on an ESP32 and demonstrates the automation of I2C that BusI2C provides.

I2C Auto-identification demo

To build the demonstration application, it is easiest to install the Raft CLI program first https://crates.io/crates/raftcli

Then use the following command line to build, flash and monitor the demonstration onto either:

  • an ESP32 dev-board like the TinyPICO (the default is to use pins 21 and 22 for SDA and SCL respectively - see below how to change this)
  • an ESP32-S3 dev-board like the Adafruit QTPy S3 (the default is to use oins 41 and 40 for SDA and SCL respectively - see below how to change this)
cd ./TestWebUI
raft run -s <systype> -p <serial-port>

where:

  • is either tinypico or qtpy
  • is the serial port the ESP32 is connected to.

If you need to change any settings (such as SCL and SDA pins for the I2C bus), first find the systypes.json file for your particular systype (these are located in the systypes folder, so the file for the qtpy systype is in ./TestWebUI/systypes/qtpy/systypes.json). Open this file in a text editor and change the required settings. E.g. the sdaPin and sclPin fields in the HWDevMan/Buses/buslist entry for "I2CA".

rafti2c's People

Contributors

robdobsn avatar dewoopp avatar

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.