This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
Reads a png file and convert it to planar raw byte file. | |
Requires Python3 and pypng. | |
Please use | |
``` | |
#pip install pypng |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import socket | |
import threading | |
import logging | |
import mraa | |
# change this to the values from MCS web console | |
DEVICE_INFO = { | |
'device_id' : 'YOUR_DEVICE_ID', | |
'device_key' : 'YOUR_DEVICE_KEY' |