List of locations of different possible crime locations using a Telegram Bot. This information could be send to the police for example.
The top button sets an alarm and the bottom one volunteers to help. Also the snooze button prolongs the countdown.
In green the score of the current heroe. Also, in red we can see the encrypted ID of the person in distress. This is linked to google maps.
Link the "heroes" see. It authomatically opens a new tab with the route they have to do in order to help the person in distress.
Nowadays street security is a major concern. The idea of using the new technologies to build smarter cities seemed a must for us. We think that the new blockchain paradigm serves a good purpose in this kind of systems because we are interested in knowing the location of people in need. This type of data is very sensitive, so a Blockchain may help users to stay anonimous. Also, a Blockchain could help to later use the data loaded there as it is immutable (any change would change the hash of the blockchain and thus we could know that the data is corrupted). This can help to build machine learning applications that do not need to trust a "server" as the data is feeded and validated by the community .
What it does
HeroChain is a web application that focuses in street safety. We have a built a system in which we have volunteers called heroes that can help people that are in distress or that feel insecure.
The key idea is that when a person feels that can be a victim of an attack or aggression, it can press a button to ask for help. Then the GPS position of that person is saved in a blockchain, so anyone nearby could help just by clicking on a google maps link. Moreover, to act quickly in case of an attack, a countdown that can be prolonged is set. Therefore, if the victim does not snooze or end the countdown, a telegram message is sent to the police (using a Telegram bot) with the GPS location of a possible crime.
To prevent evildoers, a ranking is also established so heroes would get points if a victim deactivates his or her alarm while that hero is close enough to make an impact. Besides, there is a id authorization system which is encrypted so no personal data is directly embedded on the blockchain.
Also, we have implemented a hardware part which is waiting for an alert and activates if a bot receives a telegram message and activates a robotic arm. The robotic arm will move as it was some kind of camera panning in search of any suspicious behavior. Also, a module with a raspberry-pi and a camera has been added. This allows us for either stream data (only the bot sees the stream) or to take snapshots (with a "/status" query) and send them to other telegram accounts.
During all this process we are sending the relevant data to a blockchain so that the information is transparent and reliable so that it can be use even for predicting future accidents.
How we built it
First, we develop a smart contract which is a program deployed on the blockchain and is executed for every participant of the blockchain. In this smart contract, we established the basis of the variables that will be saved on the blockchain and how to interact with them. This part was done in the website https://remix.ethereum.org/ in the language solidity.
Afterwards, hardwarewise, we designed a robotic arm and 3d printed it using a prusa steel xl. We used PDI-6223-MG servos to move the robotic arm and a piezoelectric buzzer to emulate an alarm. We connected everything using the arduino environment and programmed the main functions to actuate the hardware using the Arduino IDE and the servo library.
To connect to arduino we developed a LabView application that receives a message from Telegram and sends it to arduino activating the alarm in case of a dangerous situation. The telegram message can be either a text message or a set of coordinates that move the arm precisely to that position. This feature emulates the movement of a security camera towards a possible aggressor.
Challenges we ran into
- Difficulties to properly define the case of use
- None of us are front end developers
- Try to open a web application made in webpack without success
- Try to send automatically a twitter due to lack of a developer authorization to use their APIs
- Connection between labview and arduino
- Tried to use myo armband but too difficult to communicate
Accomplishments that we're proud of
- Moving the robotic arm
- Having a nice alarm song
- Having nice buttons
- Being able to keep awake for so long
- Being able to merge so many different programming environments
- Merge hardware and software with a unique purpose
- Made a solution that is doable and it could really help any member of the community
- Build a private blockchain that allows to have a transparent and reliable set of data
What we learned
- Some c++
- How to move servos
- Telegram API
What's next for HeroChain
In the future we could use the data collected to do some statistics about the crime and do some heatmaps, so that the users can avoid dangerous areas. Furthermore, we hope that in the future the police could collaborate with us and use the data collected as a way to backtrack an incident. This can be done using the locations stored in the blockchain and they can be sure that the data has not been changed from the data that was saved in the blockchain.
Furthermore, as this is just a proof of concept we haven't fully implemented the user id for each user. We have thought of using some sort of digital certificate (a certificate that identifies a person digitally) and pass it through a hash. The idea is that you could go to your government, which will give this certificates, and they will do the hash already. In this way, the user would have an ID that cannot be unmade and confidentiality is assured (as long as you or the government do not publish that information). In this way we think that we can have anonymous data without needing to trust any third-party or server.
Also, we think that blockchain could be used as a way to build smart cities. In this case, we implemented just a single smart contract but several contracts could be implemented to give solutions to other problems like traffic jams, ballots, etc. In this way, with the effort of the community we could build a new prototype of city.