https://github.com/follen99/smartcity
This is the repo of the Smart City WorkShop
https://github.com/follen99/smartcity
arduino sensor smart smartcity solarcell workshop
Last synced: about 2 months ago
JSON representation
This is the repo of the Smart City WorkShop
- Host: GitHub
- URL: https://github.com/follen99/smartcity
- Owner: follen99
- Created: 2021-07-22T20:29:19.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-18T00:07:25.000Z (over 4 years ago)
- Last Synced: 2025-07-10T05:16:37.416Z (11 months ago)
- Topics: arduino, sensor, smart, smartcity, solarcell, workshop
- Language: C++
- Homepage: https://follen99.github.io/ranauro.giuliano/
- Size: 1.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smart City
This is the repo of `International Competition On Embedded Systems` workshop
You can explore the circuit [HERE](https://www.tinkercad.com/things/gbxHq2Dtcys-copy-of-smart-city/editel?sharecode=mTXS8glbrD19aOvlUgvTBS_cZBWWGC0vdCaZVx69N-w)
---
### Certificate

## What Are Smart Cities?
A **smart city** is a place where traditional networks and services are made more **efficient** with the use of **digital solutions** for the benefit of its inhabitants and business.
A smart city goes beyond the use of digital technologies for **better resource** use and **less emissions**. It means smarter urban transport networks, upgraded water supply and waste disposal facilities and more efficient ways to light and heat buildings. It also means a more interactive and responsive city administration, safer public spaces and meeting the needs of an ageing population.
## My Goal
As we can see from the **Smart City** definition, the main goal is to have a **safer** and **cleaner** city.
A way to achieve that is by monitoring the `CO2` in the air and using `using less resources`, turning lights down when we do not need them or limiting car traffic when the `CO2` levels are too high.
A really important factor is to `understand` **when** and **why** some levels are too high, so a method to fix too high `CO2` values is by **logging** whenever there is an event, to **analyze** the data later.
## The Code
### Air Control
We can **monitor** the **air quality** via a `CO2` detector:

And we can control it via the code:

Of course, we need a way to interface with the circuit:

When the air gets gradually worse, a bunch of `LEDs` gradually turns on;
on the last stage, when the air is not safe, a `PIEZO` starts beeping, acting as an alarm.
---
### Turning off lights when we do not need them
We could use a circuit to turn off road lights when there is no one near by, to **save electricity**.
This goal is achieved by using an **array** of standalone sensors:

Every **sensor** is **powered** by a `Solar Cell`, to save even more power.
Anyway, the first **sensor** is connected to the `Controller` (arduino) to know when a car passes by.
We need this **feature** to **LOG** the event:

---
### LOGS
Whenever a car passes by, it's identified as an **event**, and a `Logger` saves it.
We should save events (`logs`) to a **file** or a **database**, but `TinkerCad` does not have this function yet.
We instead simply print to a console the **log** in a **json** form:

We can see how the **log** will be written:

---
Logs are a very powerful **tool**, in this case we have a simple scenario, but we could use them to know when a road is busiest, and act accordingly.