Comments (14)
BTW, the only reason I didn't use I2C initially is because I wanted the fastest throughput possible (so started with serial and then moved to SPI).
from digole.
hey thanks Michael, I have that already. Do you want Linux I2C support? Let me know and I can push this soon ...
from digole.
Yes I mean for Linux :), sorry for the confusion. I believe I'm going to learn a lot from your library. Thanks for making it FOSS.
from digole.
Sure, I will be testing with a Pi-Zero. You should get one and image a Raspbian Jesse image (that's what I'm using for test). Let me update this weekend, it uses io.c and just a new serial_open() routine to open the i2c device interface and set the slave address.
from digole.
I've been playing around with the Orange Pi Zero, and the only devices I've gotten to work so far are i2c. Lazy of me I know, I feel like any time i need to do anything that's not +5V or G on the even side of the GPIO it's unpredictable. I could have used the UART but I'm having a lot of fun messing around with 2 wire. I really appreciate you putting in the effort, and I'm sure others will as well.
Edited this to note: I'm a developer (mostly Perl, actually), and I'm not terrible at C. I've gotten other i2c stuff to work on the OPI, an SSD1306 tiny cell phone display, and a PN532 NFC reader/writer, both on the same bus. I was even considering taking a stab at adding i2c to your library myself and submitting a PR, but your code base looked too nice! If you write it for a raspi zero, I should be able to get it to work on the OPI-Z, even if it doesn't work right out of the box in my environment. The H3/H2 stuff just isn't 100% yet, but functionality and performance wise, for "headless" things, the H2+ is an amazing bargain.
I may also write a Perl wrapper for your C library if you wouldn't mind me doing so.
from digole.
BTW, I do have a working i2c device, and got a hacked up version of WiringPI installed, with my 2 i2c slaves showing up nicely on the bus.
1d [mikeyg@zilch:~/src] $ ls -la /dev/i2c-0
crw-rw---- 1 root i2c 89, 0 Feb 6 22:39 /dev/i2c-0
1d [mikeyg@zilch:~/src] $ gpio i2cd
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- 24 -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
from digole.
I just committed initial I2C support, totally untested but theoretically it should work.
I will solder up the I2C this weekend and give it some testing,
"make BUS=i2c" should get you something to try out.
Let me know how you get on, and have fun!
-james
from digole.
Oh yes, goto Adafruit and get the Pi-Zero, it's $5 and you can just power it from USB. If you get the TTL serial cable from Adafruit, you'll also have console and a nice display device with this module.
https://www.adafruit.com/products/2885
https://www.adafruit.com/products/954
http://www.ebay.com/itm/USB-to-TTL-Serial-Cable-PL2303HX-Debug-Console-Cable-for-Raspberry-Pi-/152110635794
Send me a link to the HW you're using, I will check it out ...
from digole.
Awesome!!! https://linux-sunxi.org/Xunlong_Orange_Pi_Zero is what i'm using. I already have several usb to serial adapters. I also have BCM-based pis, like raspi 2, raspi orig b, raspi 3, just no raspi zeroes. which one is the zero most like? i can test on those boards too.
I'm gonna hop on this as soon as I get home from work, its like Christmas! Thanks again so much!
from digole.
Zero has the same pin-out as the B... it's just a tiny Pi board that will fit behind the display almost. On I2C how's it going? I plan to actually do some testing on this later .... let me know if you lit up your display yet 👍
from digole.
Michael, I just reconfigured a module for I2C mode and tested top of tree - works great!
./oledtest /dev/i2c-1
from digole.
make BUS=i2c
./oledtest /dev/i2c-1
./mandel /dev/i2c-1
from digole.
Michael, I have a few Makefile changes that will let you build for SPI and I2C at the same time, I will push them this weekend. Hope all is well and you're enjoying your new display support. I just ordered half a dozen or so for some projects I am working on .... let me know if you had a nice Christmas in Feb :-)
from digole.
Michael, never heard back from you; but I do have this working now on a few designs.
Will close the issue for now, reopen if you run into some issues.
best regards
-james
from digole.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digole.