https://interactionstation.wdka.hro.nl/mediawiki/api.php?action=feedcontributions&user=Simon&feedformat=atomInteraction Station Wiki - User contributions [en]2024-03-29T08:22:59ZUser contributionsMediaWiki 1.35.7https://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2057RPi/datalogger2017-04-30T18:59:35Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
=Overview=<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br><br />
<br><br />
=Preparing a new install=<br />
Create a Dexter GrovePi SD card following one of the following paths explained in the Dexter Industries GrovePi manual: https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/getting-started/pi-prep/<br />
<br><br><br />
Next in the home directory clone the grovepy_sensorlogger git repository:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
git clone https://github.com/mywdka/grovepi_sensorlogger.git<br />
</syntaxhighlight><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/boot/sensors.txt</code> into the boot partition of the SD card (/boot on the PI itself). Adjust according to the installed sensor as outlined below.<br><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/etc/rc.local</code> into <code>/etc/rc.local</code> on the PI or create your own startup script starting <code>sensorlogger.py</code>.<br />
<br><br />
<br><br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br><br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br><br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
</code><br />
<br><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2056RPi/datalogger2017-04-30T18:59:06Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
=Overview=<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Preparing a new install=<br />
Create a Dexter GrovePi SD card following one of the following paths explained in the Dexter Industries GrovePi manual: https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/getting-started/pi-prep/<br />
<br><br><br />
Next in the home directory clone the grovepy_sensorlogger git repository:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
git clone https://github.com/mywdka/grovepi_sensorlogger.git<br />
</syntaxhighlight><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/boot/sensors.txt</code> into the boot partition of the SD card (/boot on the PI itself). Adjust according to the installed sensor as outlined below.<br><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/etc/rc.local</code> into <code>/etc/rc.local</code> on the PI or create your own startup script starting <code>sensorlogger.py</code>.<br />
<br><br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br><br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br><br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
</code><br />
<br><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2055RPi/datalogger2017-04-30T18:58:08Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
=Overview=<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Preparing a new install=<br />
Create a Dexter GrovePi SD card following one of the following paths explained in the Dexter Industries GrovePi manual: https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/getting-started/pi-prep/<br />
<br><br><br />
Next in the home directory clone the grovepy_sensorlogger git repository:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
git clone https://github.com/mywdka/grovepi_sensorlogger.git<br />
</syntaxhighlight><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/boot/sensors.txt</code> into the boot partition of the SD card (/boot on the PI itself). Adjust according to the installed sensor as outlined below.<br><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/etc/rc.local</code> into <code>/etc/rc.local</code> on the PI or create your own startup script starting <code>sensorlogger.py</code>.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
</code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2054RPi/datalogger2017-04-30T18:57:28Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
=Overview=<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Preparing a new install=<br />
Create a Dexter GrovePi SD card following one of the following paths explained in the Dexter Industries GrovePi manual: https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/getting-started/pi-prep/<br />
<br><br><br />
Next in the home directory clone the grovepy_sensorlogger git repository:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
git clone https://github.com/mywdka/grovepi_sensorlogger.git<br />
</syntaxhighligh><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/boot/sensors.txt</code> into the boot partition of the SD card (/boot on the PI itself). Adjust according to the installed sensor as outlined below.<br><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/etc/rc.local</code> into <code>/etc/rc.local</code> on the PI or create your own startup script starting <code>sensorlogger.py</code>.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
</code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2053RPi/datalogger2017-04-30T18:57:12Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
=Overview=<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Preparing a new install=<br />
Create a Dexter GrovePi SD card following one of the following paths explained in the Dexter Industries GrovePi manual: https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/getting-started/pi-prep/<br />
<br><br><br />
Next in the home directory clone the grovepy_sensorlogger git repository:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
git clone https://github.com/mywdka/grovepi_sensorlogger.git<br />
</syntaxhighligh><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/boot/sensors.txt</code> into the boot partition of the SD card (/boot on the PI itself). Adjust according to the installed sensor as outlined below.<br><br />
<br><br />
Copy <code>grovepi_sensorlogger/fs/etc/rc.local</code> into <code>/etc/rc.local</code> on the PI or create your own startup script starting <code>sensorlogger.py</code>.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2052RPi/datalogger2017-04-30T18:49:27Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
=Overview=<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2048RPi/datalogger2017-04-30T18:45:05Z<p>Simon: /* Adding new sensors */</p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight><br />
<br><br />
Start the datalogger.py script with the sensor as first argument. This can be done in rc.local or any other startup script. As example:<br />
<syntaxhighlight lang="bash" enclose="div"><br />
cat /boot/sensor.txt | grep -v "#" | xargs sudo python /home/pi/grovepi_sensorlogger/sensorlogger.py & <br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2047RPi/datalogger2017-04-30T18:42:29Z<p>Simon: /* Adding new sensors */</p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight><br />
<br />
Add a corresponding entry to the import select statement (or better, improve this ugly thing :) in sensorlogger.py<br />
<syntaxhighlight lang="Python" line start="16" enclose="div"><br />
if SENSOR == 'sound':<br />
from sensors.sound import Sensor<br />
sensor = Sensor(0, 0.5)<br />
elif SENSOR == 'dht':<br />
from sensors.dht import Sensor<br />
sensor = Sensor(4)<br />
elif SENSOR == 'uv':<br />
from sensors.uv import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'dust':<br />
from sensors.dust import Sensor<br />
sensor = Sensor()<br />
elif SENSOR == 'gas':<br />
from sensors.gas import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'air':<br />
from sensors.air import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'moist':<br />
from sensors.moist import Sensor<br />
sensor = Sensor(0)<br />
elif SENSOR == 'simple_light':<br />
from sensors.simple_light import Sensor<br />
sensor = Sensor(0)<br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2046RPi/datalogger2017-04-30T18:40:00Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:<br />
<br />
<syntaxhighlight lang="Python" line start="1" enclose="div"><br />
import time<br />
import grovepi<br />
from threading import Thread<br />
<br />
class Sensor(Thread):<br />
def __init__ (self, pin, avg_fraction=0.8):<br />
Thread.__init__(self)<br />
self.name = "Simple light sensor"<br />
self.shortname = "light"<br />
self.pin = pin<br />
self.avg_fraction = avg_fraction<br />
self.value = 0<br />
self.avg_value = 0<br />
self.stop = False<br />
<br />
grovepi.pinMode(pin, "INPUT")<br />
<br />
def get_log_header(self, delimiter):<br />
return "raw%caverage" % (delimiter)<br />
<br />
def get_log_string(self, delimiter):<br />
return "%.2f%c%.2f" % (self.value, delimiter, self.avg_value)<br />
<br />
def get_str1(self):<br />
return "val: %.2f" % (self.value)<br />
<br />
def get_str2(self):<br />
return "avg: %.2f" % (self.avg_value)<br />
<br />
def avg(self, current, new, fraction):<br />
return (current * (1.0-fraction)) + (new * fraction)<br />
<br />
def run(self):<br />
while not self.stop:<br />
try:<br />
self.value = grovepi.analogRead(self.pin)<br />
self.avg_value = self.avg(self.avg_value, self.value, self.avg_fraction)<br />
except IOError as e:<br />
print ("light sensor exception: %s" % (e))<br />
time.sleep(0.01)<br />
</syntaxhighlight></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2045RPi/datalogger2017-04-30T18:38:31Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code><br />
<br><br />
==Adding new sensors==<br />
The code can be found in the MyWDKA GitHub repository: https://github.com/mywdka/grovepi_sensorlogger<br />
Sensor entries are in the sensors subdirectory. It is easiest to have a look at the existing sensors and copy e.g. simple_light.py as a general framework:</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2044RPi/datalogger2017-04-30T18:35:54Z<p>Simon: /* Attaching the sensor */</p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br><br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2043RPi/datalogger2017-04-30T18:35:42Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
Each time the datalogger is started a new header and entries are appended to any existing log file. Hence it is possible for the log.csv file to contain multiple headers. If a clean log file is needed, remove it before starting the datalogger or remove previous entries up to the last occurrence of the header. <br><br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2042RPi/datalogger2017-04-30T18:33:49Z<p>Simon: /* Example log entry */</p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2041RPi/datalogger2017-04-30T18:33:24Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.<br />
<br />
The log.csv is a standard CSV file with the following columns:<br />
* timestamp (UTC)<br />
* latitude<br />
* longitude<br />
* signal quality<br />
* sensor type<br />
* following column(s) are sensor dependant <br />
<br />
==Example log entry==<br />
<code><br />
timestamp (UTC),latitude,longitude,signal quality,sensor type,density<br />
13:38:54,51.918777,4.486358,0,"Grove gas MQ9 sensor (CO, Coal, Liquified)",0.12<br />
<code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2040RPi/datalogger2017-04-30T18:28:06Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br><br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
=Attaching the sensor=<br />
Currently there are 7 sensors possible:<br />
* Sound sensor (connected to A0)<br />
* Moist sensor (connected to A0)<br />
* Temperature & Humidity (connected to D4)<br />
* Gas sensor MQ-9 (connected to A0)<br />
* LDR (non-grove) (connected to A0)<br />
* Air quality sensor (connected to A0)<br />
* UV sensor (connected to A0)<br />
<br />
The OLED display has to be connector to I2C-1<br />
<br />
The datalogger needs to be told what sensor is connected. To do this there is a file in the BOOT partition of the Raspberry PI SD card. This file is called <code>sensors.txt</code>. In this file uncomment the sensor connected and comment the rest by placing a # in front of the sensor name.<br />
<br />
=Reading the log file=<br />
As soon as the datalogger is turned on and the GPS is connected it will start logging data in the <code>log.csv</code> file in the BOOT partition of the Raspberry PI SD card. It will start logging even if there is no valid GPS fix. So the logger can be used indoors as well. Wheter there is a valid GPS coordinate associated with a log entry can be seen by the Fix field in the log file. If this field contains a 0 the coordinates for this entry are either the last valid coordinates or the coordinates hardcoded if there has not been a fix before.</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2039RPi/datalogger2017-04-30T18:13:31Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br><br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
<code><br />
Sound Sensor: A0<br />
<br />
Moist Sensor: A0<br />
<br />
Temperature & Humidity: D4<br />
<br />
Gas Sensor MQ-9: A0<br />
<br />
LDR: A0<br />
<br />
Air Quality Sensor: A0<br />
<br />
UV Sensor: A0<br />
<br />
OLED Display 128x64: I2C-1<br />
</code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2038RPi/datalogger2017-04-30T18:13:18Z<p>Simon: </p>
<hr />
<div>[[File:RPIDL Overview.jpg|300px|Sensor shield with gas sensor attached]]<br><br />
<br />
The data logger is a grovepi+ shield with attached:<br />
* a grove sensor<br />
* a grove OLED 128x64 display<br />
* a GPS USB dongle<br />
<br><br />
The PI can be powered by a USB power bank.<br><br />
<b>Note: </b>When using a Raspberry PI A or B (not B+) the sudden current draw may cause the powerbank to shutdown. Quickly unplugging an plugging back in can help. If not, remove the grove shield, plug in the powerbank and attach the shield. From B+ and up this problem does not occur.<br />
<br><br />
<br><br />
As soon as the datalogger is booted (can take a while) the OLED screen will show something similar as:<br><br />
[[File:RPIDL DISP GPS Disonnected.jpg|300px|GPS disconnected]]<br><br />
It shows the following:<br />
* type of sensor<br />
* GPS status<br />
* sensor data<br />
<br />
If the GPS is switched on (blue led on the GPS dongle is on) the display will show the following:<br />
[[File:RPIDL DISP GPS Connected.jpg|300px|GPS disconnected]]<br><br />
The last line will show the actual time in UTC and the GPS status shows either if it is waiting for a GPS fix or (when the blue light on the GPS is blinking) the LAT and LON coordinates of the last received message.<br />
<br />
<code><br />
Sound Sensor: A0<br />
<br />
Moist Sensor: A0<br />
<br />
Temperature & Humidity: D4<br />
<br />
Gas Sensor MQ-9: A0<br />
<br />
LDR: A0<br />
<br />
Air Quality Sensor: A0<br />
<br />
UV Sensor: A0<br />
<br />
OLED Display 128x64: I2C-1<br />
</code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:RPIDL_DISP_GPS_Connected.jpg&diff=2034File:RPIDL DISP GPS Connected.jpg2017-04-19T13:41:47Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:RPIDL_DISP_GPS_Disonnected.jpg&diff=2033File:RPIDL DISP GPS Disonnected.jpg2017-04-19T13:41:38Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:RPIDL_Overview.jpg&diff=2032File:RPIDL Overview.jpg2017-04-19T13:41:26Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2031RPi/datalogger2017-04-19T13:34:19Z<p>Simon: </p>
<hr />
<div><br />
<code><br />
Sound Sensor: A0<br />
<br />
Moist Sensor: A0<br />
<br />
Temperature & Humidity: D4<br />
<br />
Gas Sensor MQ-9: A0<br />
<br />
LDR: A0<br />
<br />
Air Quality Sensor: A0<br />
<br />
UV Sensor: A0<br />
<br />
OLED Display 128x64: I2C-1<br />
</code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=RPi/datalogger&diff=2030RPi/datalogger2017-04-19T13:33:58Z<p>Simon: Created page with " <code> Sound Sensor: A0 Moist Sensor: A0 Temperature & Humidity: D4 Gas Sensor MQ-9: A0 LDR: A0 Air Quality Sensor: A0 UV Sensor: A0 OLED Display 128x64: I2C-1 </code>"</p>
<hr />
<div><br />
<code><br />
Sound Sensor: A0<br />
Moist Sensor: A0<br />
Temperature & Humidity: D4<br />
Gas Sensor MQ-9: A0<br />
LDR: A0<br />
Air Quality Sensor: A0<br />
UV Sensor: A0<br />
<br />
OLED Display 128x64: I2C-1<br />
</code></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=User_talk:Simon&diff=2029User talk:Simon2017-04-19T10:52:48Z<p>Simon: /* Documentation */</p>
<hr />
<div>= Leaving ToDo list =<br />
<br />
== Documentation ==<br />
* [[Lora/Gateway | Lora Gateway Manual]]<br />
* [[Lora/shield | Lora Arduino Shield]]<br />
* [[RPi/datalogger | RPi datalogger manual]] <br />
* mywdka github code comments / readme<br />
** grovepi_sensorlogger<br />
** Planet<br />
** mouserPlotter<br />
** WdKA_IoT<br />
** ProcessingVirus<br />
** GyroscSensorProcessing<br />
** MemoryCoreMarathon<br />
** ERA_Proximity_detection<br />
** MagnetCoreMemory<br />
** ArduinoUnleashed<br />
** Electronics_cookbook<br />
** Arduino_Examples<br />
** MediaWiki-GitHub<br />
** Arduino_basics_1<br />
<br />
* <del>laser cleaning routine</del><br />
* [[Components/IC | Components IC list]]<br />
* circuit boards with the publication station<br />
* drone overview<br />
* netwerk / dc wiki / isTunes / zero<br />
* breadboard examples docu<br />
<br />
== Make ==<br />
* Case for dataloggers?<br />
<br />
== Bestellen ==<br />
* <del>Laser bakje</del><br />
* <del>Laser filter</del></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2028WdKA RIoT Arduino Shield2017-04-19T10:51:45Z<p>Simon: /* Programming the RN2483 */</p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
<br />
<gallery><br />
Image:LORA Shield Programming RN.jpg|LORA Shield with LDR and NTC<br />
Image:LORA Shield LittleBit.jpg|LORA Shield with LittleBit connected<br />
</gallery><br />
<br />
= Programming the RN2483 =<br />
To get started with the shield the RN2483 LoraWan module needs to be programmed with the correct frequency channels, Device ID, Application Security key and the Network Security key. All these can be found in the [http://www.italks.eu iTalks] interface. The application used for the current shields is called '''IASAPP''' and has application id BE-7A-00-30. In the devices section of the application in iTalks you can see an overview of the devices with Device EUI and Address. Clicking on the device will show the necessary keys. Make sure to program the '''NetwSKey''' and the '''AppSKey'''!<br />
<br />
Programming can be done with the python script in the firmware/utils directory: https://github.com/mywdka/WdKA_IoT/blob/master/LoraWAN_Shield/firmware/utils/init_riot_shield.py<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
To do so remove the two red jumpers and connect a USB tot serial adapter (TTL not RS232!) to the TX and RX pin on the module side:<br><br />
[[File:LORA Shield Programming RN.jpg|300px|WdKA RIoT Arduino Shield with Serial Adapter attached]]<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
Payload: <br />
<font color="red">TTTT</font><br />
<font color="green">LLLL</font><br />
<font color="blue">MMMM</font><br />
<font color="orange">BBBB</font><br />
* 2 bytes NTC (<font color="red">T</font>)<br />
* 2 bytes LDR (<font color="green">L</font>)<br />
* 2 bytes MIC (<font color="blue">M</font>)<br />
* 2 bytes LittleBits (<font color="orange">B</font>)<br />
If a sensor is not enabled the corresponding field reads 9999. <br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2027WdKA RIoT Arduino Shield2017-04-19T10:50:33Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
<br />
<gallery><br />
Image:LORA Shield Programming RN.jpg|LORA Shield with LDR and NTC<br />
Image:LORA Shield LittleBit.jpg|LORA Shield with LittleBit connected<br />
</gallery><br />
<br />
= Programming the RN2483 =<br />
To get started with the shield the RN2483 LoraWan module needs to be programmed with the correct frequency channels, Device ID, Application Security key and the Network Security key. All these can be found in the [http://www.italks.eu iTalks] interface. The application used for the current shields is called '''IASAPP''' and has application id BE-7A-00-30. In the devices section of the application in iTalks you can see an overview of the devices with Device EUI and Address. Clicking on the device will show the necessary keys. Make sure to program the '''NetwSKey''' and the '''AppSKey'''!<br />
<br />
Programming can be done with the python script in the firmware/utils directory: https://github.com/mywdka/WdKA_IoT/blob/master/LoraWAN_Shield/firmware/utils/init_riot_shield.py<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
To do so remove the two red jumpers and connect a USB tot serial adapter (TTL not RS232!) to the TX and RX pin on the module side:<br><br />
[[File:LORA Shield Programming RN.jpg|300px|WdKA RIoT Arduino Shield with Serial Adapter attached]]<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
Payload: <br />
<font color="red">TTTT</font><br />
<font color="green">LLLL</font><br />
<font color="blue">MMMM</font><br />
<font color="orange">BBBB</font><br />
* 2 bytes NTC (T)<br />
* 2 bytes LDR (L)<br />
* 2 bytes MIC (M)<br />
* 2 bytes LittleBits (B)<br />
If a sensor is not enabled the corresponding field reads 9999. <br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2026WdKA RIoT Arduino Shield2017-04-19T10:50:14Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
<br />
<gallery><br />
Image:LORA Shield Programming RN.jpg|LORA Shield with LDR and NTC<br />
Image:LORA Shield LittleBit.jpg|LORA Shield with LittleBit connected<br />
</gallery><br />
<br />
= Programming the RN2483 =<br />
To get started with the shield the RN2483 LoraWan module needs to be programmed with the correct frequency channels, Device ID, Application Security key and the Network Security key. All these can be found in the [http://www.italks.eu iTalks] interface. The application used for the current shields is called '''IASAPP''' and has application id BE-7A-00-30. In the devices section of the application in iTalks you can see an overview of the devices with Device EUI and Address. Clicking on the device will show the necessary keys. Make sure to program the '''NetwSKey''' and the '''AppSKey'''!<br />
<br />
Programming can be done with the python script in the firmware/utils directory: https://github.com/mywdka/WdKA_IoT/blob/master/LoraWAN_Shield/firmware/utils/init_riot_shield.py<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
To do so remove the two red jumpers and connect a USB tot serial adapter (TTL not RS232!) to the TX and RX pin on the module side:<br><br />
[[File:LORA Shield Programming RN.jpg|300px|WdKA RIoT Arduino Shield with Serial Adapter attached]]<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
Payload: <br />
<font color="red">TTTT</font><br />
<font color="green">LLLL</font><br />
<font color="blue">MMMM</font><br />
<font color="pink">BBBB</font><br />
* 2 bytes NTC (T)<br />
* 2 bytes LDR (L)<br />
* 2 bytes MIC (M)<br />
* 2 bytes LittleBits (B)<br />
If a sensor is not enabled the corresponding field reads 9999. <br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2025WdKA RIoT Arduino Shield2017-04-18T14:09:41Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
<br />
<gallery><br />
Image:LORA Shield Programming RN.jpg|LORA Shield with LDR and NTC<br />
Image:LORA Shield LittleBit.jpg|LORA Shield with LittleBit connected<br />
</gallery><br />
<br />
= Programming the RN2483 =<br />
To get started with the shield the RN2483 LoraWan module needs to be programmed with the correct frequency channels, Device ID, Application Security key and the Network Security key. All these can be found in the [http://www.italks.eu iTalks] interface. The application used for the current shields is called '''IASAPP''' and has application id BE-7A-00-30. In the devices section of the application in iTalks you can see an overview of the devices with Device EUI and Address. Clicking on the device will show the necessary keys. Make sure to program the '''NetwSKey''' and the '''AppSKey'''!<br />
<br />
Programming can be done with the python script in the firmware/utils directory: https://github.com/mywdka/WdKA_IoT/blob/master/LoraWAN_Shield/firmware/utils/init_riot_shield.py<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
To do so remove the two red jumpers and connect a USB tot serial adapter (TTL not RS232!) to the TX and RX pin on the module side:<br><br />
[[File:LORA Shield Programming RN.jpg|300px|WdKA RIoT Arduino Shield with Serial Adapter attached]]<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2024WdKA RIoT Arduino Shield2017-04-18T12:53:02Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
<br />
<gallery><br />
Image:LORA Shield Programming RN.jpg|LORA Shield with LDR and NTC<br />
Image:LORA Shield LittleBit.jpg|LORA Shield with LittleBit connected<br />
</gallery><br />
<br />
= Programming the RN2483 =<br />
To get started with the shield the RN2483 LoraWan module needs to be programmed with the correct frequency channels, Device ID, Application Security key and the Network Security key. All these can be found in the [http://www.italks.eu iTalks] interface. The application used for the current shields is called '''IASAPP''' and has application id BE-7A-00-30. In the devices section of the application in iTalks you can see an overview of the devices with Device EUI and Address. Clicking on the device will show the necessary keys. Make sure to program the '''NetwSKey''' and the '''AppSKey'''!<br />
<br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2023WdKA RIoT Arduino Shield2017-04-18T11:33:34Z<p>Simon: /* WdKA RIoT Arduino Shield */</p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
<br />
<gallery><br />
Image:LORA Shield Programming RN.jpg|LORA Shield with LDR and NTC<br />
Image:LORA Shield LittleBit.jpg|LORA Shield with LittleBit connected<br />
</gallery><br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2022WdKA RIoT Arduino Shield2017-04-18T11:31:40Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
[[File:LORA Shield Programming RN.jpg|300px|LORA Shield with LDR and NTC]]<br />
[[File:LORA Shield LittleBit.jpg|300px|LORA Shield with LittleBit connected]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2021WdKA RIoT Arduino Shield2017-04-18T11:31:04Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has the following inputs:<br />
* 2 analog resistance based sensors like RTDs (PTC/NTC) or LDRs. The resistive sensors form a voltage divider together with a 10kΩ ground. <br />
* 1 electret microphone input using the [http://www.mouser.com/ds/2/256/MAX4465-MAX4469-62764.pdf MAX4466] as amplifier module.<br />
* 1 LittleBit input. The LittleBit chain needs to be separately powered through a LittleBit power module at the beginning of the chain.<br />
<br />
[[File:LORA Shield Programming RN.jpg|300px|framed|LORA Shield with LDR and NTC]]<br />
[[File:LORA Shield LittleBit.jpg|300px|framed|LORA Shield with LittleBit connected]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:LORA_Shield_Programming_Arduino.jpg&diff=2020File:LORA Shield Programming Arduino.jpg2017-04-18T10:55:08Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:LORA_Shield_Normal.jpg&diff=2019File:LORA Shield Normal.jpg2017-04-18T10:54:54Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:LORA_Shield_Programming_RN.jpg&diff=2018File:LORA Shield Programming RN.jpg2017-04-18T10:54:42Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=File:LORA_Shield_LittleBit.jpg&diff=2017File:LORA Shield LittleBit.jpg2017-04-18T10:54:16Z<p>Simon: </p>
<hr />
<div></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2016WdKA RIoT Arduino Shield2017-04-18T10:36:49Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
<br />
[...] other channels removed for brevity [/...]<br />
<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
<br />
0004A30B001B64F5 18-4-2017 12:33:05 868.500 SF7 BW125 4/5 -106 5.8 33 188 2509003499990533<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2015WdKA RIoT Arduino Shield2017-04-18T10:31:28Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" collapse="true" title="Example programming the RN2483" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 1, 'f': 0}<br />
writing: mac set ch dcycle 1 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 1 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 1 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 2, 'f': 0}<br />
writing: mac set ch dcycle 2 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 2 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 2 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 3, 'f': 867100000}<br />
writing: mac set ch freq 3 867100000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 3 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 3 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 3 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 4, 'f': 867300000}<br />
writing: mac set ch freq 4 867300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 4 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 4 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 4 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 5, 'f': 867500000}<br />
writing: mac set ch freq 5 867500000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 5 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 5 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 5 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 6, 'f': 867700000}<br />
writing: mac set ch freq 6 867700000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 6 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 6 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 6 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 7, 'f': 867900000}<br />
writing: mac set ch freq 7 867900000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 7 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 7 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 7 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (6, 6), 'ch': 8, 'f': 868300000}<br />
writing: mac set ch freq 8 868300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 8 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 8 6 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 8 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (7, 7), 'ch': 9, 'f': 868800000}<br />
writing: mac set ch freq 9 868800000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 9 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 9 7 7<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 9 on<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2014WdKA RIoT Arduino Shield2017-04-18T10:30:12Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="bash" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 1, 'f': 0}<br />
writing: mac set ch dcycle 1 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 1 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 1 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 2, 'f': 0}<br />
writing: mac set ch dcycle 2 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 2 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 2 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 3, 'f': 867100000}<br />
writing: mac set ch freq 3 867100000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 3 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 3 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 3 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 4, 'f': 867300000}<br />
writing: mac set ch freq 4 867300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 4 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 4 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 4 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 5, 'f': 867500000}<br />
writing: mac set ch freq 5 867500000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 5 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 5 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 5 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 6, 'f': 867700000}<br />
writing: mac set ch freq 6 867700000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 6 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 6 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 6 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 7, 'f': 867900000}<br />
writing: mac set ch freq 7 867900000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 7 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 7 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 7 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (6, 6), 'ch': 8, 'f': 868300000}<br />
writing: mac set ch freq 8 868300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 8 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 8 6 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 8 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (7, 7), 'ch': 9, 'f': 868800000}<br />
writing: mac set ch freq 9 868800000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 9 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 9 7 7<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 9 on<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2013WdKA RIoT Arduino Shield2017-04-18T10:28:54Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="console" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 1, 'f': 0}<br />
writing: mac set ch dcycle 1 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 1 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 1 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 2, 'f': 0}<br />
writing: mac set ch dcycle 2 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 2 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 2 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 3, 'f': 867100000}<br />
writing: mac set ch freq 3 867100000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 3 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 3 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 3 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 4, 'f': 867300000}<br />
writing: mac set ch freq 4 867300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 4 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 4 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 4 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 5, 'f': 867500000}<br />
writing: mac set ch freq 5 867500000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 5 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 5 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 5 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 6, 'f': 867700000}<br />
writing: mac set ch freq 6 867700000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 6 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 6 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 6 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 7, 'f': 867900000}<br />
writing: mac set ch freq 7 867900000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 7 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 7 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 7 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (6, 6), 'ch': 8, 'f': 868300000}<br />
writing: mac set ch freq 8 868300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 8 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 8 6 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 8 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (7, 7), 'ch': 9, 'f': 868800000}<br />
writing: mac set ch freq 9 868800000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 9 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 9 7 7<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 9 on<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2012WdKA RIoT Arduino Shield2017-04-18T10:28:12Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br><br />
<syntaxhighlight lang="BashSession" enclose="div"><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 1, 'f': 0}<br />
writing: mac set ch dcycle 1 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 1 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 1 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 2, 'f': 0}<br />
writing: mac set ch dcycle 2 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 2 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 2 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 3, 'f': 867100000}<br />
writing: mac set ch freq 3 867100000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 3 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 3 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 3 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 4, 'f': 867300000}<br />
writing: mac set ch freq 4 867300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 4 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 4 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 4 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 5, 'f': 867500000}<br />
writing: mac set ch freq 5 867500000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 5 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 5 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 5 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 6, 'f': 867700000}<br />
writing: mac set ch freq 6 867700000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 6 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 6 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 6 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 7, 'f': 867900000}<br />
writing: mac set ch freq 7 867900000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 7 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 7 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 7 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (6, 6), 'ch': 8, 'f': 868300000}<br />
writing: mac set ch freq 8 868300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 8 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 8 6 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 8 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (7, 7), 'ch': 9, 'f': 868800000}<br />
writing: mac set ch freq 9 868800000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 9 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 9 7 7<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 9 on<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</syntaxhighlight><br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2011WdKA RIoT Arduino Shield2017-04-18T10:24:11Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
<br />
Example:<br />
<code><br />
[simon@aldeberan WdKA_RiOT]$ python2 init_riot_shield.py /dev/ttyUSB0 0125E1DF D8D87836076B304D757D13F5C9FD50BB C0908620ECD3C54498FAEFF34E467F5F<br />
writing: sys reset<br />
<br />
got: RN2483 1.0.1 Dec 15 2015 09:38:09 ( 52:4E:32:34:38:33:20:31:2E:30:2E:31:20:44:65:63:20:31:35:20:32:30:31:35:20:30:39:3A:33:38:3A:30:39)<br />
writing: mac get deveui<br />
<br />
got: 0004A30B001B64F5 ( 30:30:30:34:41:33:30:42:30:30:31:42:36:34:46:35)<br />
DEVEUI: 0004A30B001B64F5<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 0, 'f': 0}<br />
writing: mac set ch dcycle 0 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 0 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 0 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 1, 'f': 0}<br />
writing: mac set ch dcycle 1 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 1 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 1 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 302, 'status': 'on', 'drrange': (0, 5), 'ch': 2, 'f': 0}<br />
writing: mac set ch dcycle 2 302<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 2 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 2 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 3, 'f': 867100000}<br />
writing: mac set ch freq 3 867100000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 3 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 3 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 3 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 4, 'f': 867300000}<br />
writing: mac set ch freq 4 867300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 4 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 4 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 4 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 5, 'f': 867500000}<br />
writing: mac set ch freq 5 867500000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 5 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 5 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 5 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 6, 'f': 867700000}<br />
writing: mac set ch freq 6 867700000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 6 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 6 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 6 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (0, 5), 'ch': 7, 'f': 867900000}<br />
writing: mac set ch freq 7 867900000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 7 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 7 0 5<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 7 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (6, 6), 'ch': 8, 'f': 868300000}<br />
writing: mac set ch freq 8 868300000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 8 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 8 6 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 8 on<br />
<br />
got: ok ( 6F:6B)<br />
setting channel: {'dcycle': 0, 'status': 'on', 'drrange': (7, 7), 'ch': 9, 'f': 868800000}<br />
writing: mac set ch freq 9 868800000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch dcycle 9 0<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch drrange 9 7 7<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set ch status 9 on<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rx2 0 869525000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set rxdelay1 1000<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set retx 3<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set dr 6<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set devaddr 0125E1DF<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set nwkskey D8D87836076B304D757D13F5C9FD50BB<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac set appskey C0908620ECD3C54498FAEFF34E467F5F<br />
<br />
got: ok ( 6F:6B)<br />
writing: mac save<br />
<br />
got: ok ( 6F:6B)<br />
[simon@aldeberan WdKA_RiOT]$ <br />
</code><br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=User_talk:Simon&diff=2010User talk:Simon2017-04-12T15:17:49Z<p>Simon: </p>
<hr />
<div>= Leaving ToDo list =<br />
<br />
== Documentation ==<br />
* [[Lora/Gateway | Lora Gateway Manual]]<br />
* [[Lora/shield | Lora Arduino Shield]]<br />
* datalogger manual <br />
* mywdka github code comments / readme<br />
** grovepi_sensorlogger<br />
** Planet<br />
** mouserPlotter<br />
** WdKA_IoT<br />
** ProcessingVirus<br />
** GyroscSensorProcessing<br />
** MemoryCoreMarathon<br />
** ERA_Proximity_detection<br />
** MagnetCoreMemory<br />
** ArduinoUnleashed<br />
** Electronics_cookbook<br />
** Arduino_Examples<br />
** MediaWiki-GitHub<br />
** Arduino_basics_1<br />
<br />
* <del>laser cleaning routine</del><br />
* [[Components/IC | Components IC list]]<br />
* circuit boards with the publication station<br />
* drone overview<br />
* netwerk / dc wiki / isTunes / zero<br />
* breadboard examples docu<br />
<br />
== Make ==<br />
* Case for dataloggers?<br />
<br />
== Bestellen ==<br />
* <del>Laser bakje</del><br />
* <del>Laser filter</del></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=User_talk:Simon&diff=2009User talk:Simon2017-04-12T15:13:48Z<p>Simon: </p>
<hr />
<div>= Leaving ToDo list =<br />
<br />
== Documentation ==<br />
* [[Lora/Gateway | Lora Gateway Manual]]<br />
* [[Lora/shield | Lora Arduino Shield]]<br />
* datalogger manual <br />
* mywdka github code comments / readme<br />
** grovepi_sensorlogger<br />
** Planet<br />
** mouserPlotter<br />
** WdKA_IoT<br />
** ProcessingVirus<br />
** GyroscSensorProcessing<br />
** MemoryCoreMarathon<br />
** ERA_Proximity_detection<br />
** MagnetCoreMemory<br />
** ArduinoUnleashed<br />
** Electronics_cookbook<br />
** Arduino_Examples<br />
** MediaWiki-GitHub<br />
** Arduino_basics_1<br />
<br />
* <del>laser cleaning routine</del><br />
* [[Components/IC | Components IC list]]<br />
* soldering tips and tricks<br />
* circuit boards with the publication station<br />
* drone overview<br />
* netwerk / dc wiki / isTunes / zero<br />
* breadboard examples docu<br />
<br />
== Make ==<br />
* Case for dataloggers?<br />
<br />
== Bestellen ==<br />
* <del>Laser bakje</del><br />
* <del>Laser filter</del></div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2008WdKA RIoT Arduino Shield2017-04-12T14:48:12Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
The WDKA Riot Shield is a simple Arduino shield with a Microchip RN2483 LoRa transceiver module. The shield has inputs for 2 analog resistance based sensors like an RTDs (PTC/NTC) or LDRs sensors and the output of a LittleBit module(s). In order to activate one or more sensor readings switch the appropriate switch to the ON status. <br />
<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
python2 init_riot_shield.py /dev/ttyUSB0 0177C80C 5B462C58B7A7DF9942D6B709858CA4C8 46F1EC6FE128EB2E62EB0A38B4E9A3A6<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2007WdKA RIoT Arduino Shield2017-04-12T14:41:08Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
python2 init_riot_shield.py /dev/ttyUSB0 0177C80C 5B462C58B7A7DF9942D6B709858CA4C8 46F1EC6FE128EB2E62EB0A38B4E9A3A6<br />
<br />
== Resources ==<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
* [http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2006WdKA RIoT Arduino Shield2017-04-12T14:40:45Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
python2 init_riot_shield.py /dev/ttyUSB0 0177C80C 5B462C58B7A7DF9942D6B709858CA4C8 46F1EC6FE128EB2E62EB0A38B4E9A3A6<br />
<br />
== Resources ==<br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide] <br/><br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet] <br/><br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata] <br/><br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2005WdKA RIoT Arduino Shield2017-04-12T14:40:26Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
python2 init_riot_shield.py /dev/ttyUSB0 0177C80C 5B462C58B7A7DF9942D6B709858CA4C8 46F1EC6FE128EB2E62EB0A38B4E9A3A6<br />
<br />
== Resources ==<br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2004WdKA RIoT Arduino Shield2017-04-12T14:40:06Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
python2 init_riot_shield.py /dev/ttyUSB0 0177C80C 5B462C58B7A7DF9942D6B709858CA4C8 46F1EC6FE128EB2E62EB0A38B4E9A3A6<br />
<br />
== Resources ==<br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/40001784F.pdf RN2483 LoRa Technology Module Command Reference User’s Guide]<br />
[http://ww1.microchip.com/downloads/en/DeviceDoc/50002346B.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet]<br />
http://ww1.microchip.com/downloads/en/DeviceDoc/80000689A.pdf RN2483 Low-Power Long Range LoRa Technology Transceiver Module Datasheet Errata]<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=WdKA_RIoT_Arduino_Shield&diff=2003WdKA RIoT Arduino Shield2017-04-12T14:22:48Z<p>Simon: </p>
<hr />
<div>= WdKA RIoT Arduino Shield =<br />
[[File:Wdka riot shield 10042017.jpg|300px|WdKA RIoT Arduino Shield]]<br />
<br />
python2 init_riot_shield.py /dev/ttyUSB0 DevAddr NwkSKey AppsKey<br />
python2 init_riot_shield.py /dev/ttyUSB0 0177C80C 5B462C58B7A7DF9942D6B709858CA4C8 46F1EC6FE128EB2E62EB0A38B4E9A3A6<br />
<br />
== Notes & References ==<br />
<div class="references-small"> <references /> </div><br />
<br />
[[Category:IoT]]<br />
[[Category:Lora]]<br />
[[Category:Arduino]]</div>Simonhttps://interactionstation.wdka.hro.nl/mediawiki/index.php?title=Components/IC&diff=2002Components/IC2017-04-10T14:46:13Z<p>Simon: /* List of ICs at the Interaction Station and there purpose */</p>
<hr />
<div>= List of ICs at the Interaction Station and there purpose =<br />
[[File:IAS COMPONTENTS ICS 20170410 154100.jpg|400px]]<br />
{| class="wikitable sortable"<br />
|-<br />
! IC !! Description !! Logic Type !! Package !! Supply min !! Supply max. !! Datasheet<br />
|-<br />
| LMC555CN || 555 Timer || CMOS / TTL Compatible || DIP8 || 1.5V || 15V || http://www.ti.com/lit/ds/symlink/lmc555.pdf<br />
|-<br />
| LMC555CM || 555 Timer || CMOS / TTL Compatible || SO8 || 1.5V || 15V || http://www.ti.com/lit/ds/symlink/lmc555.pdf<br />
|-<br />
| NE555 || 555 Timer || TTL Compatible || SO8 || 4.5V || 16V || http://www.ti.com/lit/ds/symlink/ne555.pdf<br />
|-<br />
| SN74AHC595N || 8-Bit Shift Register, 3-State || CMOS || DIP16 || 2V || 5.5V || http://www.ti.com/lit/ds/symlink/sn74ahc595.pdf<br />
|-<br />
| CD4094BE || 8-Bit Shift Register, 3-State || CMOS || DIP16 || 3V || 18V || http://www.ti.com/lit/ds/symlink/cd4094b.pdf<br />
|-<br />
| ULN2004A<br />
|-<br />
| ULN2003A <br />
|-<br />
| CD4029BE<br />
|-<br />
| HEF4017BP<br />
|-<br />
| 4n25<br />
|-<br />
| SN74HCT14N<br />
|-<br />
| OPA213PA<br />
|-<br />
| LM386N-3<br />
|-<br />
| LM324N<br />
|-<br />
| LM741CN<br />
|-<br />
| LM317T<br />
|-<br />
| ATTINY2313-20PU<br />
|-<br />
| ATMEGA328P-PU<br />
|}</div>Simon