Hey!
I got an SPI OLED Display, which ist not supported by the LCD Plugin. My idea is to get values out ouf Pimatic via the API (ie Temperature from DHT22) and read it in into a Python script to display it on the OLED. Unfortunately i have no idea how to do this. I read the API guide already but i’m not in to programming… Someone could help me with this?
Thx alot!
-
Getting Values from Pimatic via API
-
i guess this thread will help you:
-
Thx for your reply! This helps me alot but I still don’t know how to implement the value in a python script for displaying it on the OLED. Maybe i should ask in a python forum but i could imagine that some other users here have the same question or are interested in getting an non i2c display with pimatic to work…?
-
i2c displays are already implemented.
https://github.com/pimatic/pimatic-lcd
this plugin is for simple 2x16 or 4x16 displayspimatic rocks!!!
-
as you can read above it’s not an i2c display. it’s an spi OLED
-
@mrblonde said:
an non i2c display
Sorry dont read the “non” in your question.
Feel free to create a plugin for an oled display. i think it would be awesome.pimatic rocks!!!
-
Still nobody interested?
-
hey i am interested
well what about using a shellsensor device to hand over a variable to the python script?
a native solution via plugin would surely be better, but this needs to be implemented by a @Developer first …what script do you use to adress the oled?
pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@mrblonde said:
Still nobody interested?
Can you please let me know which OLED Display you have?
If you have pointers on how to drive the display this will be great. -
I’m using a SSD1306 SPI OLED and I’m using the library of Adafruit https://learn.adafruit.com/ssd1306-oled-displays-with-raspberry-pi-and-beaglebone-black/usage
Using the ShellSensor sounds good… but I have absolutely no idea of pythonBut the idea to get the values from http://USER:PASS@pimatic/api/variables/ with curl sounds even easier?
-
This post is deleted!
-
@mrblonde I think a oled plugin for pimatic could be developed easily with Oled-JS. It is a fancy oled driver built on top of Johnny-Five. Besides running Johnny-Five programs on Arduino, various plugins are provided to drive IO on various boards directly, including Raspi-IO.
Getting back to Oled-JS, the advantage of this library is, that it supports, both, i2c and SPI (I have tested i2c, only so far). Maybe you can try the demo (if you have have some basic Nodejs/Javascript skills that should be fine). You can use the following test with tweaks shown below https://github.com/noopkat/oled-js/blob/master/tests/demoTime_bt.js
Install raspiio into the oled-js installation directory, i.e.
npm i raspi-io --save
Change the first few lines of demoTime_bt.js as follows:var raspi = require('raspi-io'), five = require('johnny-five'), pngtolcd = require('png-to-lcd'), Oled = require('../oled'), font = require('oled-font-5x7'), temporal = require('temporal'); var board = new five.Board({ io: new raspi() }); // testing features board.on('ready', function() { console.log('Connected to Arduino, ready.'); var opts = { width: 128, height: 64, slavePin: 12 };
Please also make sure to read the section on SPI. I am not sure the note on SPI beeing slow also applies for Johnny-Five driving Raspi GPIO directly. I think it is worth giving a try. Even i2c is fast enough for most applications, in my opinion.
There is also one downside of using John-Five here. As the Raspi-IO driver is using WiringX it requires root privileges. For pimatic, running as root is the normal case for most pimatic setups nowaday, but it is a major security concern as @lukx pointed out - see the following thread for discussion: http://forum.pimatic.org/topic/897/running-pimatic-without-root-privileges
-
@mwittig Thank you very much! I will give it a try!
-
I have also started developing a new plugin which will support OLEDs and many other things. The plugin will open up the fanatstic world of Johnny Five to pimatic. However this will take some time to finish off (mid November the earliest)
-
@mwittig this is great! looking forward to it!
-
@mwittig: Great news! I also have bought such a display and I’m very excited about your plugin.
-
any news to this topic? I’m still interested. thx!
-
Anything new to get values from pimatic to the OLED?
Thx! -
@mrblonde said in Getting Values from Pimatic via API:
Anything new to get values from pimatic to the OLED?
Kind of. A long running timing issue has been fixed in Johnny Five which resulted in garbled output on the display and this is why the oled display driver never got integrated into the plugin. I’ll update to the new version of J5 asap and give a try with the Oled driver. I’ll keep you posted. Feel free to give a try yourself with the code snippet above and let me know about your findings. https://github.com/noopkat/oled-js