https://github.com/rootz491/rpi-control
control raspberry pi 3 using a website.
https://github.com/rootz491/rpi-control
Last synced: about 1 year ago
JSON representation
control raspberry pi 3 using a website.
- Host: GitHub
- URL: https://github.com/rootz491/rpi-control
- Owner: rootz491
- Created: 2020-11-28T03:01:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T07:11:09.000Z (about 4 years ago)
- Last Synced: 2025-03-09T14:06:22.623Z (over 1 year ago)
- Language: Python
- Size: 4.18 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# IoT X Django project
## Tech:
* _Django_ [backend]
* _SQLite3_ [database]
* _html, css_ [templates]
* _Raspberry Pi 3_ [HARDWARE]
## dependencies:
* python 3.7.5
* django 3.1.3
* RPi.gpiozero
## How it works?
> Django is used for URL mapping, working as perfect server.
> one of the methods is **update**, used to handle the request (POST)
> that contain a bool input to change the state of LED.
> Using GPIOZERO to actually work with built-in PINS of Raspberry Pi
> anytime user will change the state of LED, it will get stored in database.
> Also, with changing the state. one can also pass the message. Although it's
> just optional but message will get stored along with that change in state and
> timeStamp of when state was changed.
>
> when you'll start working with this source code, for first serve of index page
> it will show LED is *GLOWING* that's because Last time i tested on it, i left
> LED open.
>
> gpio15 is the pin number in which you'll have to connect LED in order to work.
> although you can change the pin number to whatever you want.
## Problems:
* If you are using python 3.8.x for some reason, then it won't work directly.
* to make it work, paste *_sqlite.so* in the root of this project directory.
* Also remember to update Raspberry Pi to it's latest version for complete gpio support.

Thankyou!