-
Laser cut case finished
08/15/2019 at 01:16 • 0 commentsAfter designing the laser cut case and attaching my components to it, I am nearly done with the project. I think it looks pretty cool.
-
Crash Detection woking with interrupts
08/10/2019 at 05:50 • 0 commentsI finally managed to get the accelerometer to give me an output only when the G force on it crosses a certain threshold using interrupts. I did this by reading the ADXL345's registers.
The falling edge is the output that came when I shook the accelerometer to depict an impact.
Now I need to work on sending an SMS when the crash is detected.
-
Reading the Values manually from the ADXL module
07/27/2019 at 14:00 • 0 commentsUsing the smbus module, and the help of my dad, I was able to get the acceleration from the module without using an external library. For some reason I wasn't able to find an online refrence for using the Interrupt pins on the ADXL module. So afr I'm getting value but some problem causes it to give me impossible values.
Fun fact: if that right most value was real we would all be flattened against the surface of the Earth.
I need to fix that
-
Crash Alert Up and Running
07/12/2019 at 01:11 • 0 commentsI wired up the Pi to the ADXL345 and tested it and tested the code. It seemed to work fine. The Pi needed the I2C interface to be on preceding a reboot. After that I made a few modifications
import time # Import the ADXL345 module. import Adafruit_ADXL345 # Create an ADXL345 instance. accel = Adafruit_ADXL345.ADXL345()
I used the above modules.
while True: # Read the X, Y, Z axis acceleration values x, y, z = accel.read() if x > 500 or y > 500 or z > 500: #500 is the number that the values go above in all my crash tests print('crash alert') # Wait half a second and repeat. time.sleep(0.25)
This is the code I used.
The output was the words "crash alert" showing up when I shake the ADXL345 module.
This was detected because after testing I found that in which ever angle you shake it, the X, Y, or Z value went above 500. When an actual crash happens, the entire thing would shake the same way. So I used this method to get the crash alert.
-
Got the Raspberry Pi 4 working with my code
07/09/2019 at 01:09 • 0 commentsI got the Raspberry Pi 4 setup with the Raspbian OS. So I connected up the PiCamera v2 and started working. The audio out was through wired earphones, and I finally got the drowsiness detection working!!!
Now I need to begin work on the next part of my project which is detecting a car crash.
I wonder how I'm going to test that...
-
Got the Drowsiness detection working
07/04/2019 at 12:09 • 0 commentsAfter learning some OpenCV programming I was able to create a system where it detects when a user is falling asleep and plays a sound.
I will start working on getting the system to detect crashes soon