Thursday, October 30, 2014

Get CAN up and running on BeagleBone Black

Started to work with a BeagleBone Black and the CAN bus it contains. Just make it easy to get up and running I made a very simple script to do just that.

Get the BBB-CAN script from github.Original instruction are from this Embedded Things blog post.

Sunday, October 26, 2014

Quick intro to Onki 0.0.3

Here is a quick introduction to Onki.


Wednesday, October 22, 2014

Onki 0.0.3 released

Where did the days go, already 22 days since 0.0.2 docked in the Harbour. Well, anyway, I just uploaded 0.0.3 to Harbour and OpenRepos.

Whats new you ask ? Well, plenty:
  • Loosing sync with the device should be fixed now
  • Audio settings on a separate page, the basic Bass and Treble, Center and Subwoofer volume adjustments. Also Music Optimizer toggler.
  • Preliminary zones support. Input selection only for now, need to do some more internal re-working for this to work ok. Oh and only Zone 2 has been tested, so if you happen to have one of those more expensive that support 3 or 4 zones, please let me know if it works or not.
  • And that means preliminary, you can select a source for other zones, but not much else.
  • Tuner presets, yay :)
  • Device is asked for supported inputs and zones and if it knows how tell use that then we will use them
  • Remorse timer for Power-off button
  • Optional autoconnect on start (if only one device is found by device discovery)

Tuner presets!
Known bugs/features missing:
  • No way to power-off zones 2,3,4
  • Sometimes query for inputs,zones and presets fails. Re-connect and it should work.

Enjoy!

Friday, October 17, 2014

Raspberry Pi doing i2c LCD display in C++

I'm working on a Raspberry Pi project that needs to be running headless but still be able to communicate with the outside world in some way. We are currently using a simple Red (error), Yellow (waiting for something), Green (Ok) (+blinking) to inform the user of various conditions (you can see them in the picture).

For most features that seem to be ok, but we are thinking about having somekind of display for a bit more details. A cheap 16x1/16x2 display would work quite nicely I think.

Today inspiration hit me to look into that a bit more. I had a 16x1 LCD laying around and a PCF8574T i2c I/O-expander backpack. Wired it up to the Raspberry Pi and started to look for some (proper aka C++) code. No luck there. Just some silly python this and python that. meh.
Well, it works fine on the Arduino.. and that is C++.. hmm, let's port it to plain Linux i2c interface (well, ok, wiringPi i2c wrappers). And so I did.

Here you go:

Raspberry Pi controlling LCD display with i2c in C++

I will do a bit cleanup and then code will be up on github.

You can get LCDs and i2c backpacks from Amazon:

Wednesday, October 15, 2014

Some Kotibussi progress and backend thoughts

The first Kotibussi demo used the very basic ENC28J60 Ethernet controller based ethernet shield. That means the TCP/IP stack had to be run on the Arduino itself, taking up a lot of precious memory. I'm moving it now over to a WizNet W5200 based shield that takes care of the TCP/IP stack in hardware for me, makes a ton of difference in the amount of memory I now have to play with.

Some ideas are to have an integrated RTC and some way to configure the device without re-flashing, aka some control buttons and menu system, the added memory helps a ton in this.

And the backend. Luckily there is a standard for M2M transport data, Siri, unfortunately it is not well suited for low-bandwidth/low-speed/low-memory devices as it is XML based and extremely verbose. And it is also pull based so I would need to poll the data and that is just stupid.

So a Siri2MQTT gateway needs to be created, some minor progress in there, just a skeleton for now but  getting there.

Then there is the minor issue that Turku does not provide any data yet (no timetable, they hope to get it open in 2015), luckily some cities in Finland aren't that behind in progress so I will use Tampere Public Transport SIRI service for now.


Monday, October 06, 2014

Zone handling in Onkyo ISCP

Is kinda annoying.

My device has 2 zones, Master and Zone 2. Onkyo devices can have up to four zones. You can ask the device if the zones are powered, and it can say 01 for powered, 00 if off and N/A if the zone does not exist. So probing what zones are available should be just a matter of asking the power information, and ignore zones that say N/A, right ?

Nope, my 2 zone device answers for Zone 3 with a 00 and for Zone 4 N/A. Sigh...

Oh and no, I can't turn on Zone 3, it just answers with 00. And just for fun I plugged in a USB Sound card as I noticed the firmware contains snd-usb-audio.ko module, but no, no such luck, no Zone 3. Oh, yes, your Onyko runs Linux in case you didn't know that yet.