Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   swallowed by the forest
Sunday, June 30 2019
This morning I took the dogs on a walk down the Gullies Trail (most of which they walked parallel to me on the Stick Trail some 100-300 feet away). I hadn't been far down that trail in a long time. I don't think I'd been on the Mountain Goat part of the trail in over a year. Since I'd last been through there, there had been a number of tree and branch falls blocking the path. More troubling than that was that parts of the sloping terrace that forms the trail across the steep slope had begun to erode away. The trail became even worse once it crossed the Chanterelle Valley, with lots of woody debris blocking the way, forcing me to leave the trail in a few places. I need to come back through this region with a chainsaw or the trails will (which have been in place for 15 years) will soon be swallowed by the forest.
Speaking of swallowed by the forest, the dogs got separated from me somewhere near where the trail sputtered out and didn't join me for the return home. I didn't see them again for another four or five hours.

Today's recreational stimulant was 120 milligrams of pseudoephedrine, though its effects weren't quite as strong as expected. Last night I'd made myself massive pasta shells with tempeh red sauce, and I'd eaten the rest of it this morning. I suspect it played a role in counteracting the pseudoephedrine (even though I waited a long time between eating the pasta and taking the drugs).
This evening I was finally able to figure out how to make a Python script that could first flip a relay (to power up the megaphone), play a music file, and then turn off the megaphone. The script even accepts a filename as a parameter, allowing me to play any audio file through the megaphone. This would be a usable interface (via ssh) to do what I want the speakerbot to do, but a better interface would be a web page with a browseable list of audio files to be played. Even better would be a Javascript mechanism to record an audio file from the browser, copy it to the Raspberry Pi, and then play it. Here's what the script looked like:


import pygame
import os
# import RPi.GPIO module
import RPi.GPIO as GPIO			
import sys
# lets us have a delay	
from time import sleep
# choose BCM or BOARD						
GPIO.setmode(GPIO.BCM)	
# set GPIO24 as an output		
GPIO.setup(24, GPIO.OUT)		
#pygame.mixer.init()

audioFile = sys.argv[1]
print audioFile
try:
	#i have an infinite loop going to see 
	# if the switching on and off happens correctly every
	while True: 
		#  time, set GPIO24 to 1/GPIO.HIGH/True							
		GPIO.output(24, 0)		
		pygame.mixer.init()
		pygame.mixer.music.load(audioFile)
		pygame.mixer.music.play()
		#sleep(0.2)
		while pygame.mixer.music.get_busy():
			sleep(0.1)
		# set GPIO24 to 0/GPIO.LOW/False
		GPIO.output(24, 1)		
		# wait half a second
		sleep(0.5)				
# trap a CTRL+C keyboard interrupt
except KeyboardInterrupt:	
	# resets all GPIO ports used by this	
	GPIO.cleanup()				

One of the things I required to properly test this system was small audio files (that is, files that play a sound that is only a few seconds long). I have plenty of songs, but they all take three or more minutes to play, and that's too long to wait to see if your megaphone is being properly switched on and off. What I needed was a collection of sound effects. With things like clip art or GIF animations, there are many places where these can be freely and anonymously downloaded. But when you want to download no-license audio files, you're always required to first create an account, which, for me, is a bridge too far (particularly when doing so doesn't necessarily result in the goods promised). Perhaps this is a necessity as a way of monetizing client activity given the server expense of hosting and delivering large media files. Fortunately, there are plenty of good sound effect libraries available via Bittorrent.

[REDACTED]


A great crested flycatcher in the garden, photographed either today or yesterday.



Charles the cat.


Oscar and Diane in the driveway, photographed yesterday.


The otherday a strange "blonde" firefly landed on me in the laboratory. On closer examination, it appeared to have been sprayed with some sort of pigment. There had probably been pigment on the firefly's eyes as well, but cleaning that off had been a priority. Photographed yesterday.


For linking purposes this article's URL is:
http://asecular.com/blog.php?190630

feedback
previous | next