
I’ll keep everyone posted with progress.

Things that *don’t* yet work…
Sleeping till sunrise/sunset.
Setting the time/date/location using the touchscreen.
Switching something on at sunrise/sunset.
However its a start, and the sunrise/sunset times appear to agree with Google’s thoughts on the subject, within one minute, so not a bad start.

Watch this space for further enlightenment. ![]()
For the record, the camera battery is going to be controlled with one of these… I was going to use a transistor and a 3V relay with a diode, but the pre-built board is around the same price as the components, and looks much neater (and has on opto-coupler thrown in for free).
Now all I need is a bit of spare time to code the sleep and wake on alarm interrupt routines and play with the relay. I think I’ll use the “Ugly board” for the finished project.
(Seems crazy to me that some places have this.. In fact i heard on the radio the other day that some people want to put South Australia on the same time zone as Sydney and Melbourne, but i doubt it will happen)

nice arc of lights center and high-lighted tower/saturn 5 to right:-)
11:00 static either way, nice green though
now i actually know what big dipper looks like
your dog is moving though:-)
stephen
It seems that I have a near infinite capacity from breaking these little boards. I cant even blame electrical interference from the Aurora as it hasn’t shown up tonight. I was attempting to play with low power mode, and alarms as part of my research for this project. To cut a long story short I flashed my latest masterpiece to the board and apparently killed it stone dead. Either the USB would fail to connect as if the board was toast, or dmesg would show it had done *something* with…. usb 1-1-port2: unable to enumerate USB device , but would claim the board had zero K of flash… when I attempted to program it… not good.
Even attempting to flash with the reset button down failed to get the thing out of sulk mode, so I resorted to the big guns.
The big gun in question of course being openocd, the sonic screwdriver of the microcontroller world. Since I managed to revive the pesky little bleeder I thought I would share my work flow.
First of all you will need openocd and an ST-Link V2 device (genuine or clone).
Next I recommend you read my Wiki article here…
Work your way through to the point where you connect with telnet localhost 4444
Next hold down the RESET button on the board and with it held down, issue a
> reset halt
The board will probably not actually halt at this point, until you release the reset button.
If all goes well you will see..
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000c60 msp: 0x20005000
These numbers may be slightly different on different processors.
Now we need to try to erase the existing garbage in the flash and replace it with something that works.
Fire up the arduino IDE and compile something for the board that you know will work (a blink sketch or whatever). I used the 6502 emulator because I had that open in a different window.
Look in the IDE compiler window for the objcopy line near the end, something like this..
……arm-none-eabi-objcopy -O binary /tmp/build8185549224902354832.tmp/arduino_6502.cpp.elf /tmp/build8185549224902354832.tmp/arduino_6502.cpp.bin
.. there you will see the temporary .bin file created by the compiler. This is what we need to flash to the STM32F103 as a test.
Next, in the openocd window type in the instruction to flash this file to the device.
> flash write_image erase /tmp/build8185549224902354832.tmp/arduino_6502.cpp.bin 0x08000000
This will auto erase the flash (even , it seems despite the board claiming it had none) and should put your compiled sketch on the device at 0x08000000
You should see something like..
wrote 29696 bytes from file /tmp/build8185549224902354832.tmp/arduino_6502.cpp.bin in 1.674014s (17.324 KiB/s)
If so, the thing is back in the land of the living (sans bootloader of course). Now restart it.
> reset run
.. and it should re-enumerate on the USB bus. If it doesn’t appear within a few seconds, power it off and back on. Hopefully at this point, your board will be none the worse for its ordeal. ![]()
I noticed your name on Hackaday as I’m on their mailing list, but I realised it was not your STM32 camera timer ![]()
Which is a shame…
I noticed your name on Hackaday as I’m on their mailing list, but I realised it was not your STM32 camera timer ![]()
Which is a shame…
Thanks Andy.
I wonder if we will get in influx of new STM32 users ![]()
Thanks Andy.
I wonder if we will get in influx of new STM32 users ![]()
I did post a comment to that effect, and linked back to here in the comments, but my comment has not been approved yet. maybe they are have all gone home at HAD towers. If you look closely at the picture, you will see it is an STM board (one of these), not a pro mini. I also have the software running on a BluePill from which I have removed the power LED to save a few mA.
couldn’t see enough in first picture, second – you just made my day, really messed up pinouts though
stephen
… couldn’t see enough in first picture, second – you just made my day, really messed up pinouts though
stephen
An Esp8266 based version would be useful, and possibly a BLE version would be interesting.
you might want to look at Linux Journal this months issue. p34
article on bird cam, some interesting bits
stephen
you might want to look at Linux Journal this months issue. p34
article on bird cam, some interesting bits
stephen

Normally this is open countryside, green from here to the horizon.
HINT: Right click>View Image> Zoom in for more detail.
i assume the male is purple in some way
best birds, a blue jay when way younger and in 2011 a buzzard telegraph pole hopping (6 of them honestly) as i pedalled along
a lane in Wales, couple of seagulls having a go at a buzzard until it banked and dropped its talons down.
those eggs are a really nice shade of blue. my mother was a painter, all types and knew colours.
me, just straight lines, vertical, horizontal, hence the mech eng bsc; but i do wish i could draw/sketch.
what flagged the article was the polar tilt and sunrise/sunset aspects
stephen
i assume the male is purple in some way


