Skip to content

rubycho/webpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpi

Raspberry PI Controllable API. (Graduation Project)

Check out!

This API Provides

  • File Management
    • file(s) information on directory (like ls -al)
    • download and upload file
    • create directory
    • delete file or directory
  • GPIO Management
    • gpio pin(s) status (only general + hw_pwm pins)
    • set mode of pin
    • set output value of pin
    • set pwm dutycycle and frequency of pin
  • PI Infomation
    • PI spec
    • PI status (i.e. time, memory used, # of procs)
    • process information (Top 10 CPU/MEM using processes)
  • Simple Terminal
    • create subprocess (bash)
    • make input to subprocess
    • get output from subprocess
    • kill subprocess

Test Environment

  • Raspberry PI 2
  • Raspbian Buster (2019-06)
  • SDCard >= 32GB

Dependencies

  • django and drf for API server
  • pigpio for controlling gpio
  • psutil for retrieving process information

Run for dev purpose (Ubuntu)

# setup
virtualenv venv -p python3
source venv/bin/activate
pip install -r requirements.txt 

# run
export PIGPIO_ADDR={YOUR_PI_ADDR} 
python manage.py runserver

Test

  • uses django.test(unittest)
$ export PIGPIO_ADDR={YOUR_PI_ADDR}
$ coverage run manage.py test

About

RaspberryPi (2) Controllable API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •