jaretburkett / arduino-i2c-port-expander Goto Github PK
View Code? Open in Web Editor NEWTurn any Arduino compatable chip into an amazing I2C port expander / touch screen controller.
License: MIT License
Turn any Arduino compatable chip into an amazing I2C port expander / touch screen controller.
License: MIT License
Can you please guide me to get this work with rpi?
TIA
I'm building a Donkey2 autonomous RC car(DIYRoboCars.com) and they use an rPi controlling the 2 RC servos via a PCA9685( I2C PWM driver). It works great except to train the neural network we have to drive the vehicle manually and record video and the PWM/Servo signals. How it's done now is it requires driving the car va WiFi connection to the rPi using a table/phone/webpage. ugh.
I want to replace the PCA9685 board with an Arduino which emulates the PCA9685 driver but can also be switched so the Arduino reads PWM signals from the real RC receiver and maps those to the same servo outputs normally driven vi the I2C interface. I'll have to add a change to the rPi/Donkey code to poll/read the PWM values from the emulator with an added method to read the current PWM settings/values.
Adafruit's library for their PCA9685 board:
https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library
If you're interested in any of this let me know.
Hi,
I was really pleased with this library/application since I only need two more digital I/Os and I'm using the I2C bus on an ESP8266 "D1 mini" for an OLED and an EEPROM anyway.
So I took an ATtiny85 out of the craft box, downloaded and installed the "TinyWireS" library and then programmed "ATtiny_Slave_I2C_Port_Expander" (everything in the default settings) into the ATtiny.
SDA is connected to pin 5 (PB0/GPIO0) and SCL to pin 7 (PB2/GPIO2).
As soon as the ATtiny is connected to the I2C, communication via the I2C is disrupted and my OLED display only shows nonsense. As soon as SDA is connected, nothing works on the I2C.
Did I miss something? Are there any things that need to be taken into account if no other participants are operating on the I2C?
Thank you.
Regards, Thorsten
Two suggestions, the PCF8574 etc. has the ability to generate an interrupt on the host on change of input pins. It would be nice to have that feature available with this expander.
Also, power save/sleep mode. Some (most? all?) of the targets this can be used on have sleep mode and wake on change. I'm not sure if that would be enough to wake on I2C activity or not but it would be another nice thing to have if it can be implemented.
"io.analogRead(pin); - Returns analog read value as int. Must call slaves digital pin number not its analog pin. So use 14 instead of A0."
I don't understand this, isn't A0 defined as 14 already? On 328p at least?
https://arduino.stackexchange.com/a/21599
i tried on esp8266_arduino ide and our esp8266_sming ide.Analog read and write not working if esp8266 as master. Have you any idea?
@jaretburkett :
Thanks for this library, it was a perfect starting point for my experiments in this.
I plan to use an updated version within the Sming Framework for ESP8266.
The work in progress is in my fork : https://github.com/hreintke/Arduino-I2C-Port-Expander.git
Branch Sming_Updates
Do you want me to PR when finished or keep your version as is.
This could have unforeseen consequences :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.