tisdag 10 januari 2017

MCP2515PICtail started talking!

Today I made a connection to the MCP2515Pictail !

I put the canusb on hold just to tie up some loose ends. I tried this tutorial
Installed some can-utils and rebooted.

I followed the steps until 7. And at first it didn't work, I just got 'garbage' when I wrote candump can0
But After some time and looking at other stuff, maybe a reboot? I got an answer!

It continually spits out data now, the oscilloscope reacts and at least one piece of data makes sense.
The one with red background turns to 00 if the PIR motion detection reacts.

pi@raspberrypi:~ $ candump can0
 can0  220   [8]  FF FF FF FF 00 00 00 00
 can0  230   [8]  00 00 00 00 00 00 00 00
 can0  210   [8]  00 00 00 00 00 00 00 00
continues to loop the 3 values forever...


So that's pretty cool.

Tomorrow I'm going to look at python to see if I can make some kind of program to react and maybe upload some data on an sql server or so.

I've started to look at Python-can to do this.

Inga kommentarer:

Skicka en kommentar