mwyborski / rpi_i2c_bit_banging Goto Github PK
View Code? Open in Web Editor NEWI2C bit banging bus with raspberry pi and wiringPi. Use any GPIO Pins as I2C Bus
License: MIT License
I2C bit banging bus with raspberry pi and wiringPi. Use any GPIO Pins as I2C Bus
License: MIT License
When I want to compile with your lib with g++ -g -Wall -fPIC lwiringPi -o PCA9685.o PCA9685.cpp i2c.o i get following error: .o: file not recognized: File format not recognized.
I had created the i2c.o with: g++ -O -lwiringPi -o i2c.o rpi_i2c_bit_banging.cpp
I have a problem with my IMU(MPU6050) and my DAC(PCA9685). Im using on my IMU the I2cdevlib with DMP and it seems that is critical, when you attach another device on the I2c rail then and when, you comunicate with the DAC the IMU freezes, you connect a 1.8kOhm resistor to 3.3V on the used I2c pins ?
Thanks for your answer.
Please add license.
Hello,
I am making a Youtube video that uses your library. It is a good one, thank you.
But to the top of that .cpp file one needs to add
#include
that nowadays seems to be needed for the error messages (Raspbian, Geany).
Would it be a problem for you to add it?
Best regards
Miika Kurkela
Hello, as I use a level shifter to make it work with a 5v i2c bus, I am limited with the i2c speed.
I tried to change the parameter "delayTicks_" but with the rpi4, the i2c_delay() function is still too fast and so it doesn't work.
I understand why you used a loop because usleep is limited to 80us but I suggest to replace it with delayMicroseconds()
as wiringpi is used.
The new i2c_delay() function should be :
void i2cBitBangingBus::i2c_delay()
{
// unsigned int index;
//for (index = 0; index < delayTicks; index++)
// ;
delayMicroseconds(delayTicks);
}
With delayTicks_ set to 5us when creating a bus, I manage to change the speed of 1Mhz to 100Khz ;)
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.