Skip to content

geekceo/fastapi-arduino-lightlevel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Build Status Build Status

Python  FastAPI  Arduino

Getting Started

Install the python libs
pip install fastapi uvicorn pyserial
We flash the Arduino microcontroller with firmware from the Arduino folder
We assemble the electrical circuit according to the scheme:

Build Status

Launch

Open the FastAPI folder from the terminal and start the web server
uvicorn main:app --reload

Using

We make a request using the GET method at http://127.0.0.1:8000/arduino/light-level and get a response with a body, example:
{
    "level": 922,
    "type": "dark"
}

Releases

No releases published

Packages

No packages published