This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:bon_accord_webcam [2020/10/29 15:59] neil |
projects:bon_accord_webcam [2021/05/02 14:50] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Bon Accord Webcam ====== | ====== Bon Accord Webcam ====== | ||
- | I set this up over lockdown (in the summer) to see how busy the beer garden was (and whether there was a table available) at a glance on my phone. It could be moved horizontonally and vertically from both the web interface and from a command line interface (much more responsive). It was a USB telescope (I'm about 150 meters from the beer garden) velcro mounted on a USB missile launcher. I controlled it with a PHP script that moved the mount using shell commands to a raspberry pi mounted in the window of one of the bedrooms. | + | I set this up over lockdown (in the summer) to see how busy the beer garden was (and whether there was a table available) at a glance on my phone. I wanted to just use what I had lying around. If I could do this again (and I probably will) I think I'd make something with stepper motors (so I could return it to fixed positions). |
- | The website was only temporary (I've sinced moved) but with the camera movement interface it looked like this: | + | It could be moved horizontonally and vertically from both the web interface and from a command line interface (much more responsive). It was a USB telescope (I'm about 150 meters from the beer garden) velcro mounted on a USB missile launcher. I controlled it with a PHP script that moved the mount using shell commands to a raspberry pi mounted in the window of one of the bedrooms. |
+ | |||
+ | It was one of these missile launcher USB gadgets \\ | ||
+ | {{:projects:pasted:20201029-160202.png?0x400}} | ||
+ | |||
+ | With a USB telescope mounted to it with velcro scraps \\ | ||
+ | {{:projects:pasted:20201029-160102.png?0x400}} | ||
+ | |||
+ | The website was only temporary (I've sinced moved house) but with the camera movement interface it looked like this: | ||
{{:projects:pasted:20201029-153406.png}} | {{:projects:pasted:20201029-153406.png}} | ||
Line 11: | Line 19: | ||
===== Technical details ===== | ===== Technical details ===== | ||
- | [[https://motion-project.github.io/|Motion]] was used to stream the output from the USB telescope to a port on the Rasperry Pi. This was then embedded in an img tag on the front end (refreshed twice a second). The movement buttons were PHP wrappers to a python command line program, [[http://lukecole.name/usb_missile_launcher|USB missile launcher]]. | + | [[https://motion-project.github.io/|Motion]] was used to stream the output from the USB telescope to a port on the Rasperry Pi. This was then embedded in an img tag on the front end (refreshed twice a second). The movement buttons were PHP wrappers to a python command line program, [[https://www.lukecole.name/research_and_projects/personal/usb_missile_launcher/|USB missile launcher]] ([[https://sourceforge.net/projects/usbmissile/|sourceforge link]]) |
- | This command line program took simple parameters to move the USB missile mount, for example: | + | This command line program took simple parameters to move the USB missile mount, for example to move the launcher right for 30 milliseconds: |
<code bash> | <code bash> | ||
./USBMissileLauncherUtils -R -S 30 | ./USBMissileLauncherUtils -R -S 30 | ||
</code> | </code> | ||
- | Would move the missible launcher right for 30 milliseconds. | ||
- | I wrote a simple command line wrapper to allow me to control the movement from the console: | ||
+ | |||
+ | I wrote a simple command line wrapper to allow me to control the movement from the console: | ||
<code bash> | <code bash> | ||
#!/bin/bash | #!/bin/bash | ||
Line 50: | Line 58: | ||
This allowed the camera to be moved using the keyboard arrows ([A, [B, [C, [D) and the speed (length of time the motor would be turned on) could be set using the number keys. | This allowed the camera to be moved using the keyboard arrows ([A, [B, [C, [D) and the speed (length of time the motor would be turned on) could be set using the number keys. | ||
- | The PHP wrapper was pretty simple, it only allowed a fix amount of movement (30 milliseconds): | + | The PHP wrapper was pretty simple, triggered from the buttons in the web interface, it only allowed a fix amount of movement (30 milliseconds): |
<code php> | <code php> | ||
Line 73: | Line 81: | ||
==== Timelapse ==== | ==== Timelapse ==== | ||
{{:projects:bon-webcam-timelapse.mp4?500|Testing out a timelapse}} | {{:projects:bon-webcam-timelapse.mp4?500|Testing out a timelapse}} | ||
+ | |||
+ | ==== Installing USBMissileLauncher ===== | ||
+ | <code bash> | ||
+ | wget https://sourceforge.net/projects/usbmissile/files/usbmissile/1.5/USBMissileLauncher-1.5.tgz/download -o USBMissileLauncher-1.5.tgz | ||
+ | tar zxvf USBMissileLauncher-1.5.tgz | ||
+ | cd USBMissileLauncher-1.5 | ||
+ | sudo apt install libusb-dev | ||
+ | make | ||
+ | </code> |