alexzhu1998 / RaspberryPiR

This is an R package designed to transfer Raspberry Pi sensor data into R using Rcpp and WiringPi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RaspberryPiR

This package only works for the Raspberry Pi. Currently tested on Raspberry Pi 4B+.

Link to download Honours Thesis: https://fnavarro.perso.math.cnrs.fr/files/HonoursThesis.pdf

Link to useR Presentation: https://docs.google.com/presentation/d/1Jl385wOo0gKYG2L_-Ian6NJVLtGfGt5x/edit?usp=sharing&ouid=110727880616037588892&rtpof=true&sd=true

This is an R package that can control Raspberry Pi GPIO pins with Shared Memory Functions to write and read streaming data. Streaming analysis code is also provided.

Please ensure the C library wiringPi.h is installed. Compile the library using the shell script

compile/compileEVERYTHING.sh

Picture of the structure: alt text

Picture of the setup: alt text

Code that requires compilation

C++ Source Code: located at src/

  • utils/ contains utility functions for wiringPi.h library, sys/shm.h library and RaspiCam library

  • remaining source code converts writeMemory, readMemory, freeMemory functions into R functions

R Source Code: located at R/

  • contain some simple Linux command lines to examine the state of memory usage.

R Analysis Code located at demo/

  • Code for Online Mean and Variance

  • Code for Control Charts

  • Code for Online PCA

  • Code for Tukey Region

  • Code for Bayesian Change point Detection

Additional Code for Model Assessments can be found in

  • Additional_Code_model_assessment.R

  • Additional_Code_Online_PCA.R

About

This is an R package designed to transfer Raspberry Pi sensor data into R using Rcpp and WiringPi

License:MIT License


Languages

Language:C++ 81.0%Language:R 17.9%Language:M4 1.0%Language:Shell 0.1%