I was looking for something that could read current and voltage, and came across this module. Wondering if anybody has used this with, maybe a Propeller, using C code.
It seems like there is example code and a wiring diagram for a Raspberry Pi, but I wonder if this could be workable with the new P2, and of course the P1.
Thanks
Ray
Comments
Life is unpredictable. Eat dessert first.
Hollywood, CA
It's Jon or JonnyMac -- please do not call me Jonny.
I used the one from Adafruit.
Wrote C code to drive it nicely.
Mike
I also looked at Jon's jm_ina219.spin program, I wonder how that would work with the flexGUI IDE. The last time I used the spintoc part of flexGUI, to convert some Spin code to PropGCC, I was not able to make the PropGCC code work correctly.
I will probably be collecting the INA260 data, continuously, and feeding it to an SQLite database, for further analysis. These are just a few things that I have in mind.
My object will work if you write your code in Spin or in FlexC.
I've attached a demo program that uses four of my Spin objects without modification/conversion -- one that launches a PASM cog (serial io). Interesting, the C binary image was a little bigger than the identical program written in Spin; this may have to do with overhead dealing with Spin objects in C. Still it works, so I can write C code without walking away from all of my existing objects. Spin is my favorite Propeller language, but it's nice to have C as an option.
Hollywood, CA
It's Jon or JonnyMac -- please do not call me Jonny.
Mike
A determined coder can write COBOL programs in any language. -- Author unknown.
Press any key to continue, any other key to quit
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
What I don't see how to do so far: Including/using bytecode Spin in FastSpin LMM code and the other way round. But I dont expect much demand for this. :-)
Mike
Thanks iseries, for a pointer to your libina260 driver. I will also take a closer look at your SimpleIDE implementation for using the INA260.
Now, I have to get a better understanding of the code that has been presented so far before I make a decision as to what I will be using. Will it be SimpleIDE, flexC, flexBASIC, micropython, or, …
Another choice P2 Eval or FLiP module or ...