<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Tubby</title>
    <description>The latest articles on Forem by Tubby (@tubbie).</description>
    <link>https://forem.com/tubbie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F238333%2Fbaf742c1-0c02-44c0-860b-d18c2c7b5510.png</url>
      <title>Forem: Tubby</title>
      <link>https://forem.com/tubbie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tubbie"/>
    <language>en</language>
    <item>
      <title>My contribution to #BLM.</title>
      <dc:creator>Tubby</dc:creator>
      <pubDate>Sun, 03 Jan 2021 14:37:57 +0000</pubDate>
      <link>https://forem.com/tubbie/my-contribution-to-blm-58gm</link>
      <guid>https://forem.com/tubbie/my-contribution-to-blm-58gm</guid>
      <description>&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Tubbie"&gt;
        Tubbie
      &lt;/a&gt; / &lt;a href="https://github.com/Tubbie/let-me-breathe"&gt;
        let-me-breathe
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;It has been more than a month since the Black Life Matters protests broke out this time because of the death of George Floyd(RIP) murder and since the very beginning, the thing which got stuck in my mind was that the only reason this case exploded was that there was video evidence! &lt;/p&gt;

&lt;p&gt;If the bystanders weren't recording it, this murder would have been justified by police as "use of necessary force" we all know what it would have meant and would carry on with our lives. We would also know that the police's body cam would have mysteriously malfunctioned, hence there wouldn't be any evidence of the crime.&lt;/p&gt;

&lt;p&gt;The video shocked me to the core and made me wonder how a human being can be this cruel to another. Another thought which came to mind was because there was video evidence, at least there will be a trial on those police officers but those without will never get justice and moreover, the perpetrators will do it again.&lt;/p&gt;

&lt;p&gt;I was afraid that this could happen to me also so I decided to protect myself by recording with my phone camera. But this was cumbersome and buying a body camera sounded a bit absurd to me. Also, I wanted it to save it and still have access if the camera is destroyed, stolen or maliciously deleted. Hence I decided to build one using &lt;code&gt;Raspberry Pi&lt;/code&gt; (RasPi). &lt;br&gt;
The idea is simple, record video of specific interval and then video upload it to a file server where I or a trusted person can have access to it. My vision for this project is for anyone to build for themself with as little tech knowledge as possible and with the least monetary investment possible.&lt;/p&gt;

&lt;p&gt;For my prototype, I used &lt;code&gt;Raspberry Pi Zero W&lt;/code&gt; as the brains and &lt;code&gt;DropBox&lt;/code&gt; as free remote file storage. The whole project cost me about 20 Euros (about 25 US Dollars).&lt;br&gt;
As RasPi Zero W has only Wi-Fi, I enable the hotspots from my phone and it connects to this network and uploads the recorded videos. &lt;/p&gt;

&lt;p&gt;The program runs as a start-up process and as soon as I connect the power after a brief moment of bootup process it starts recording. The video are recorded in a set of minute/s interval. Currently the videos is recorded without audio as there is no Audio I/O built onto the RasPi Zero W. I have already implemented it with a USB Microphone, but the quality is lousy and implementation a bit excessive for a beginner.&lt;/p&gt;

&lt;p&gt;I wish to perfect this soon but I would very grateful for the community take it further or provide some help. &lt;br&gt;
The next big steps for this project I see as of now is having features like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recording with audio&lt;/li&gt;
&lt;li&gt;Voice activated recording&lt;/li&gt;
&lt;li&gt;Connecting to the fitness band and to start recording in case of higher heart rate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you would like to build one for yourself or would like to contribute or see how bad my code is check out the github repo below ;-)&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Tubbie"&gt;
        Tubbie
      &lt;/a&gt; / &lt;a href="https://github.com/Tubbie/let-me-breathe"&gt;
        let-me-breathe
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h1&gt;
LET-ME-BREATHE&lt;/h1&gt;
&lt;p&gt;Let me breathe is an open source project to develop a low cost body camera.&lt;br&gt;
Main goal of the project is to transfer to a remote server as soon as possible
The Project uses &lt;code&gt;RasberryPi Zero W&lt;/code&gt; to use as a module
to capture via the camera and upload to a specific remote file storage or a server.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://youtu.be/s8nQU0ljaas" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/95aab8b785db8fa8aa697d1399f195dd87856622d7a2e16b8bb76ef57118ce24/68747470733a2f2f696d672e796f75747562652e636f6d2f76692f73386e5155306c6a6161732f302e6a7067" alt="IMAGE ALT TEXT HERE"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
Installation&lt;/h2&gt;
&lt;p&gt;Requirements for the Installation.&lt;/p&gt;
&lt;p&gt;Hardware Requirements.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.raspberrypi.org/" rel="nofollow"&gt;RaspberryPi Single Board Computer.&lt;/a&gt; RaspberryPi Zero W preffered.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.raspberrypi.org/products/camera-module-v2/" rel="nofollow"&gt;RaspberryPi Camera Module.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Power Source. Can be a Power Bank outputting 5V.&lt;/li&gt;
&lt;li&gt;MicroUSB Cable.&lt;/li&gt;
&lt;li&gt;MicroSD Card. 8GB+ Recommended.&lt;/li&gt;
&lt;li&gt;MicroSD card reader. (If needed.)&lt;/li&gt;
&lt;li&gt;Raspberry Pi Case. (Recommended if for outdoor use.)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Software Requirements.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.raspberrypi.org/downloads/" rel="nofollow"&gt;Raspberry Pi OS Lite.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Image making tool like
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.raspberrypi.org/downloads/" rel="nofollow"&gt;Imager&lt;/a&gt; (Recommended)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.balena.io/etcher/" rel="nofollow"&gt;Etcher&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;A Computer. (Need help with Windows and MAC OS documentation.)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Steps to install.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Insert MicroSD card to your PC.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use an Imaging tool to create the RasPi OS Lite(32 Bit if the…&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Tubbie/let-me-breathe"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/s8nQU0ljaas"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;P.S. Please check your local laws regarding the video recording, this might be an offence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer: This post was written in July 2020 and was in draft till now. Due to burnout, procrastinating, and feeling a lack of correct skills for the project this post was delayed. I now feel this should be shared even if the project is in the nascent stage and is not professional enough. I hope some of you can take it further. Thank you!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>raspberrypi</category>
      <category>iot</category>
      <category>blm</category>
      <category>letmebreathe</category>
    </item>
    <item>
      <title>Optimal way to store/consume scheduled/recurring events</title>
      <dc:creator>Tubby</dc:creator>
      <pubDate>Mon, 30 Mar 2020 19:32:20 +0000</pubDate>
      <link>https://forem.com/tubbie/optimal-way-to-store-consume-scheduled-recurring-events-57kh</link>
      <guid>https://forem.com/tubbie/optimal-way-to-store-consume-scheduled-recurring-events-57kh</guid>
      <description>&lt;p&gt;I am working on best way to store the scheduled and recurring events. I am taking inspiration from here - &lt;a href="https://github.com/bmoeskau/Extensible/blob/master/recurrence-overview.md"&gt;https://github.com/bmoeskau/Extensible/blob/master/recurrence-overview.md&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I will be storing any events as RRule(iCal Events - &lt;strong&gt;&lt;a href="https://tools.ietf.org/html/rfc5545"&gt;https://tools.ietf.org/html/rfc5545&lt;/a&gt;&lt;/strong&gt;) and duration of the event as separate properties. &lt;br&gt;
The structure will look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Schedule {
    String rRule; //Varchar
    String startTime; //DateTime
    String endTime; //DateTime
} 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;With this structure the clients can show the events on calendar without querying the API.&lt;/p&gt;

&lt;p&gt;It gets interesting when the events can be modified.&lt;br&gt;
For Ex: Schedule = 'Daily at 10:00, duration 2 Hours' creates an event for everyday. But the user can modify(disable) any particular event. and this change should be stored. For this the above article suggests to use &lt;code&gt;EventException&lt;/code&gt;(&lt;a href="https://github.com/bmoeskau/Extensible/blob/master/recurrence-overview.md#eventexception"&gt;https://github.com/bmoeskau/Extensible/blob/master/recurrence-overview.md#eventexception&lt;/a&gt;)  where the modified events are stored.&lt;/p&gt;

&lt;p&gt;But in my use case I want to store if the event was successfully completed. (I can mitigate this by saying any event by default is successful, if there was some modification I store it in &lt;code&gt;EventException&lt;/code&gt; and need to be fetched from here) &lt;/p&gt;




&lt;p&gt;So I would like your opinion if this is the best way to do it? Did you have similar experience and how it was solved.&lt;br&gt;
I am working on it to design a solution which reduces the work for both frontend and backend.&lt;/p&gt;

&lt;p&gt;Also is it wise to store the RRule as a separate entity instead of a string?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
