Skip to content

Commit

Permalink
fix: correct LaTeX in DIY Smartwatch post
Browse files Browse the repository at this point in the history
Forgot to append the script.
  • Loading branch information
blamster19 committed Jun 12, 2024
1 parent 662d228 commit 3841fbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _posts/2024-06-12-diy-smartwatch.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tags: crafts electronics
excerpt: What is the best assignment project that is easy to do and useful? DIY smartwatch!
---

<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>

# Motivation

Expand Down Expand Up @@ -56,7 +57,7 @@ LCD.show()

To me that short time necessary to get something to work was astonishing. Here I was holding a working watch done in five minutes. Happy with the result I eagerly started to give my code some structure. In the following steps I added panels which you can swipe up and down along with arrows showing whether there are more panels to swipe to. I tried to incorporate LVGL Python bindings to make nicer visuals, but my efforts went in vain, so I prioritized quick progress over doing things elegantly.

The biggest challenge was to utilize the pulse oximeter. There is a library called [MAX30102-MicroPython-driver](https://github.com/n-elia/MAX30102-MicroPython-driver), but it has no ready example of $SpO_2$ measurement. I searched for some other solutions like MAX30105 drivers and even thought about running C pulse oximeter code on one core and MicroPython interface on the other, but in the end I settled for MAX30102-MicroPython-driver with modified example code. The modified parts were pin definitions, red LED measurement logging and some sampling rate values. I also added saturation measurement as follows:
The biggest challenge was to utilize the pulse oximeter. There is a library called [MAX30102-MicroPython-driver](https://github.com/n-elia/MAX30102-MicroPython-driver), but it has no ready example of $$SpO_2$$ measurement. I searched for some other solutions like MAX30105 drivers and even thought about running C pulse oximeter code on one core and MicroPython interface on the other, but in the end I settled for MAX30102-MicroPython-driver with modified example code. The modified parts were pin definitions, red LED measurement logging and some sampling rate values. I also added saturation measurement as follows:

```python
R = sum(red_peaks[:][0]) / sum(ir_peaks[:][0]) * len(ir_peaks[:][0]) / len(red_peaks[:][0])
Expand Down Expand Up @@ -89,7 +90,7 @@ At the time of writing the case is too short to fit all cables; this will be rep
The case needs some polishing when it comes to housing all the stuff, but overall effect is quite satisfactory for a project done in about one week. Sometimes the MicroPython code crashes, probably something related to pulse oximeter thread, but I had no time to repair it yet. For me this is, first and foremost, a platform to test new ideas and as such it suits its purpose well.

![Date and time](/assets/images/postimages/diysmartwatch/datetime.jpg){: width="500" .center-image}
![BPM and $SpO_2$](/assets/images/postimages/diysmartwatch/bpm.jpg){: width="500" .center-image}
![BPM and $$SpO_2$$](/assets/images/postimages/diysmartwatch/bpm.jpg){: width="500" .center-image}
![Level bubble](/assets/images/postimages/diysmartwatch/level.jpg){: width="500" .center-image}

Things to do later: install straps, print more precisely, fix buggy code, add more software features, add a way to turn this thing off (shhh!).

0 comments on commit 3841fbf

Please sign in to comment.