Wednesday 21 November 2018

Alice thru the looking glass... or maybe not Gear VR



I've been thinking about another one of those what if''s - not like those from i1Tesla :)

What if I could re-use an old GearVR - you have to love Samsung for forcing new ones as the phones change, so I still have an old one hanging around from my Note 7 days.

What if I could re-use an old GearVR with the drone for FPV instead of indulging in some of those lovely Epson Moverio BT-300FPV Smart Glasses...
Stumbled across this video and looks like there are a few of them, to basically drill out one side of the Gear VR clamps....



Was thinking, what if we could hack one of the modular connectors on the other side, keep the clean un-drilled out look?
As it happened I had a spare connector, so out came the multimeter to determine pinouts and the handy soldering usb pen....

Parts / Links:





https://www.electroschematics.com/4856/usb-how-things-work/




Oops! D- and D+ round the wrong way first try - great use of a multimeter :(


Swapped round - Green / D+ on the top row next to the 5V

Some good ol' hot melt glue

Couple of layers of heatshrink moulded to nicely bend round


Bingo! FPV with the aid of the Litchi app ( Google Play )



Thursday 15 November 2018

Need a bigger print bed... love Prusa mk3... still love my MP Mini

My MP Mini has been a great workhorse, giving me the entry into the 3D printing realm with plenty of fun and learning experiences, although it's entry level print bed size (110x110) is just a little too small for some of the projects I need to for the Model 3.

The Prusa i3 MK3 keeps shouting out to me to buy it, but then I stumbled across a few more hacking links for the MP Mini....
https://codingwithspike.wordpress.com/2017/08/18/mp-select-mini-extended-bed-part-1-y-axis/

Looked like a reasonably interesting route to allow me to still have the fun with the mini, push the print bed size and save a few $ without jumping to the $$$ point of the Prusa... I'm sure it will shout louder at me in the future, but for now the single colout mini will still surfice and after trying a small sample of TPU successfully, it was time to get cracking, get some aluminum and dig out the hacksaw ....

Purchased Parts:


  • Aluminum - ~$10 - local hardware store
  • 2 x 330mm steel rods (Y Axis) - $
  • 2 x 8mm x 400mm steel rods (X Axis) - $7 - http://a.co/d/fb6K3L4
  • Anycubic Ultrabase 220 x 220mm Tempered Glass base with Hotbed - $29.99 - http://a.co/d/5gyruXm
  • 5 Meters GT2 6mm Width 2mm Pitch Timing Belt - $6.99 - http://a.co/d/bUC0cZx
  • Rivet Gun & w sample rivet pack - $8.66 - http://a.co/d/hoDgyua

Printed Parts:






















Using the old bed as the template is great - but use it round the correct way i.e. not this way !
The difference is that you will have the slots for the timing belt aligned correctly :)










Wednesday 7 November 2018

Can we make it easier to open that frunk?

Opening the frunk is 'ok' with the app .... but it doesn't survive the simplicity test..


Simplicity is relative, as with everything, but having to dig into pocket open phone, open app or click the notification bar and then click on 'open frunk' ... wow I'm exhausted just typing it.

wondering maybe nfc, maybe bluetooth...


maybe nfc tag near the front T, atleast a tap from the phone is less than a fumble

Brian at i1Tesla had the awesome idea for raising the trunk when it opens, go check his YouTube channel out here.


Sunday 21 October 2018

TeslaCamPi - Uploading the Tesla DashCam videos dynamically to AWS / DropDox

Current active github TeslaUSB project from a great team look here
https://github.com/cimryan/teslausb




<WIP>

8GB virtual USB Drive
uploads 'Saved-' files from TeslaCam to dropbox
crontab running every 5 mins

frostymccool/TeslaCamPi


Extending from:





  



MAKE A PI ZERO W SMART USB FLASH DRIVE

https://www.raspberrypi.org/magpi/pi-zero-w-smart-usb-flash-drive/

3GB for TeslaCam, 8G for Music

Create 3G TeslaCam drive file
sudo dd if=/dev/zero of=/piTeslaCam.bin bs=3M seek=1024 count=0

Create the file to user for usb fat sharing drive
sudo dd if=/dev/zero of=/piTeslaMusic.bin bs=8M seek=1024 count=0

sudo mkdosfs /piTeslaMusic.bin -F 32 -I
sudo mkdosfs /piTeslaCam.bin -F 32 -I

Mount the TeslaCam and create the key folder that the car will look for 
sudo mount -t vfat /piTeslaCam.bin /mnt/temp && sudo mkdir /mnt/temp/TeslaCam
sudo umount /mnt/temp
sudo nano /etc/fstab
Append the line below to the end of the file
/piTeslaMusic.bin /mnt/usb_share vfat users,umask=000 0 2

/piTeslaCam.bin /mnt/usb_share vfat users,umask=000 0 2

Test the mass storage gadget - … if it doesn’t work, likely a conflicting gadget is already loaded (try checking / removing  loaders from boot/configtext)
sudo modprobe g_mass_storage file=/piTeslaCam.bin stall=0 ro=0 removable=1
sudo modprobe g_mass_storage file=/piTeslaMusic.bin stall=0 ro=0 removable=1

For the normal load gadget line, they should be loaded together, only difference is that the music gadget can be loaded readonly as there is no need to allow the car to have write access to it.
sudo modprobe g_mass_storage file=/piTeslaCam.bin,/piTeslaMusic.bin stall=0,0, ro=0,1 removable=1,1


AWS S3 uploader .....

<TBD> .... event date stamp min vs file ... concatenated 10min 'saved-front-...' files ... contruct 360-saved... with just the front and structure for merging sides and rear  - assuming they will be able to be exported by Tesla soon :)

And dropbox uploader ..

https://www.raspberrypi.org/forums/viewtopic.php?t=164166


python dbupteslacam.py 


script modifications:


# Path to use for re-mounting to make sure get up to date data
umountdir = "/mnt/usb_share"
#The directory to sync
syncdir="/mnt/usb_share/TeslaCam"
#Filename prefix to test for
filenameprefix="saved-"


#Uploads files in a directory
def upload_files(path, level):
    fullpath = os.path.join(syncdir,path)
    print_output("Syncing " + fullpath,level)
    if filenameprefix:
        print_output("Syncing files with prefix only: " + filenameprefix, level) 


....

        #Loop through the files to check to upload
        for f in files:                                 
            print_output("Found File: " + f,level)   
            if upload == 1 and (f[:len(filenameprefix)]==filenameprefix) and (overwrite == 1 or not f in dfiles):



... and at the bottom ...

#re-mount the folder to make sure it's fresh
def remount():
        cmd = [ 'sudo', 'umount', umountdir ]
        p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)

        cmd = [ 'sudo', 'mount', '-a' ]
        p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)

#Start
remount()


crontab

*/5 * * * * python /home/pi/dbupteslacam.py







Issues/updates:
  • possibly need to control w/r more across the gadget and the share, there are some FSCK files appearing in the root  and 0 byte file minutes. (pre-dropbox addition)
  • check dropbox handler to make sure noop if no wifi
  • update uploader to a daemon / stop it just spinning up multiple instances
  • update / use accelerometer on pi to trigger the copy / upload.. at least it will snapshot in case user forgets to hit the button even in wifi not available.... 
  • could maybe use trigger on phone to switch on phone hotspot... then tcp - teslacampi :) - could connect and use the phone hotspot to upload



Saturday 5 May 2018

And the bike weighs in at...




With PiScales up and running it was time to finally check out the weight of the small additions to the bike made over the last few months.



It was time to find out....

A side effect (aka bug) of PiScales not connecting to a wireless network was that after every measurement the code throws exception and restarts, so it was a quick ... read before reboot...

- in this case the non connection to wifi was great for this otherwise fitbit would have added a few lbs to my weight tracking :)

So weighed myself and then holding the bike... with some simple maths ....






64 lbs / 29 Kg

without battery: 55 lbs / 25 Kg
battery: 9 lbs / 4 Kg





Saturday 7 April 2018

Dig out the old Wiifit board and allow it to tell fitbit how well you are doing .. enter PiScales ...

The thought of manually typing in my daily weight into fitbit just didn't sit well.

Manual / Repetitive.

Sure fitbit have their custom scales, but where's the fun in that.

Have been experimenting the great wiifit raspberry pi tutorial form initial state..., but it was a little too much functionality / not quite what I wanted and bluetooth was playing games with me - I could easily set the code in a loop and cause too much 2.4G(assumption) noise that it messed up my local wifi , so the whole thing sat on the shelf for quite a while...

I want something that where I can turn on / off easily and ideally give clear visual feedback on what the measurement was that day with some nice small display, have the ability to measure a few times, not have to drag too many things around (too many boxes connected) and not having to switch things on / off and wait too long....

with the pi zero w released and displays getting still cheaper and custom fit to pi zero, it's time to start looking again.



  


  





Wednesday 7 March 2018

The search for the bike back light solution

whims and wishes


  • li battery power / backup
  • have ability to plug into micro usb and leave plug not affecting light functions
  • auto switch on / off
  • auto brake light
  • ...



Research options:

  1. LED Bike Brake Stop Running Tail Light Rear Brake Lamp TURN SIGNAL LAMP HY10 http://r.ebay.com/ye7l2Z
  2. FCC certified, rechargeable 4-in-1 smart bike taillight that turns on and off automatically, brake signal when bike slows down abruptly, SOS distress light, and optional theft-deterrent alarm.  http://a.co/a6Z5JRK
  3. https://www.ebay.com/itm/7LED-Bike-Cycling-Turn-Night-Brake-Light-Bicycle-Handlebar-Lamp-Bell-8Sound-Horn/282649503042?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649