Rick's b.log - 2021/01/08 |
|
It is the 21st of November 2024 You are 3.144.93.14, pleased to meet you! |
|
mailto:
blog -at- heyrick -dot- eu
By 11am, it was a balmier -1°C. I went for a walk up the lane and back (about a kilometre) and then sat outside as it was almost warm in the sun. The postman thought that was funny.
Later on, as the temperature dropped in mid-afternoon, fog grew to make a less pleasant day.
It's 9pm and heading towards -3°C. AccuWeather reckons it'll hit minus five. Brrr...
I've shelved plans for using a ring buffer as it wasn't working, and the compiler is too damn slow to take time to work out why. Apart from occasional glitches when WiFi is busy, it plays quite well. Better than the app on my phone, I ought to point out. ☺
Apart from tidying up a few things (volume in steps of 5 with the max being 100), I am adding in serial control. This will work in two different ways. The first is a simple control and report interface like this:
What is going on here is that my NetRadio started, and tuned into Heart 80s (the first listed station). Which was playing Peter Gabriel's Sledgehammer, as any 80s station must at least once a day.
I then press A to ask for a list of stations. PPN Radio is the ninth station, so I press 9 and it tunes to PPN Radio (called "PPNR02" as that's the stream name). It begins to play Jumalten Aika.
As I write this, more songs are playing, and they're duly being listed. Note, by the way, that this pulls the title and artist information directly from the Icy metadata. The information shown on the LCD is clipped to 16 characters maximum (as that's the width of a line of the LCD).
While it is nice to have serial control to be able to change channels and such without touching the device, this was mostly just a "throw it in".
This will alleviate the need to burn the firmware with all of this hardcoded. If the device starts up without a WiFi AP configured, it will show this on the LCD:
From there, you'd choose options to set everything up, which will be stored in NVRAM. Nothing needs to be hardcoded any more.
Of course, a selection of channels will be provided by default - Heart 80s, Classic FM, BBC Radio 4, Gothique13, and PPN I would imagine. Something like that. You can, of course, change this.
The radio will also remember, most likely, its last configured volume and station to resume with those settings when it is next powered up. Also useful as resets (due to losing WiFi or whatever) will carry on playing the chosen station, rather than reverting to the first in the list.
Cold
It went down to -5.8°C this morning. It was odd, it hovered around -2 for much of the night, and then nosedived down to nearly -6 as the sun came up.
A walk in the sun.
The gloom.Working on Rick's Net Radio
I decided today to make a few modifications to my ESP32 based (streaming) Net Radio.
Rick's NetRadio is initialising...
(version 0.05 built at 21:00:23 on Jan 8 2021)
Connected to Heart 80s
Controls: [P]revious/[N]ext station, [L]ouder/[Q]uieter, [M]ute,
show [A]ll stations, [0]-[9] direct station choice,
[S]etup (playing stops), [C]opyright, or [R]eset device.
Currently playing "Sledgehammer" by Peter Gabriel.
Available stations:
0 - Heart 80s (http://media-ice.musicradio.com/Heart80s)
1 - Eagle 96.4FM (http://streaming.ukrd.com/eagle.mp3)
2 - Classic FM (http://media-ice.musicradio.com/ClassicFM)
3 - Retro Hits Canada (http://149.56.183.178:8300/stream)
4 - BBC Radio 4 FM (http://bbcmedia.ic.llnwd.net/stream/bbcmedia_radio4fm_mf_p)
5 - Alouette (http://broadcast.infomaniak.net/alouette-high.mp3)
6 - JPopsuki Radio! (http://jpopsuki.fm:8000/stream)
7 - Birdsong FM (http://streaming.radio.co/s5c5da6a36/listen)
8 - Gothique13 (http://66.55.145.43:7037/)
9 - PPNR02 (http://streamingV2.shoutcast.com/PPNR02)
Changing to PPNR02.
Connected to PPNR02
Controls: [P]revious/[N]ext station, [L]ouder/[Q]uieter, [M]ute,
show [A]ll stations, [0]-[9] direct station choice,
[S]etup (playing stops), [C]opyright, or [R]eset device.
Currently playing "Jumalten Aika" by Moonsorrow.
The volume is now 90.
The volume is now 95.
Currently playing "Gladiator" by Operatika.
Currently playing "TargetSpot" by Targetspot.
Currently playing "Calliopeia" by Stream Of Passion.
Currently playing "Desire Part II - Forsaken" by Wildpath.
Currently playing "Shadowmaker" by Apocalyptica.
Currently playing "Burden Of Divinity" by Visions of Atlantis.
Currently playing "Silver Moonlight" by Within Temptation.
I press L twice to bump the volume up to 95% (it is directly connected to my speakers, and can drive them without needing to use the battery powered amplifier, but it does need the sound cranked up).
Several things play after that. The one called "TargetSpot" is "don't drink and drive" advertising.
What I plan to do is to have the serial interface, combined with the onboard NVRAM, be used for setting up the radio. This will allow the following things to be stored:
Set me up!
Rick, 9th January 2021, 23:06 Only spent a little while working on the code today, but I've added some code to remember the current volume and currently selected station, so it'll turn on with the same settings as were used previously. That alone is a pretty useful change!Rick, 11th January 2021, 20:24 It's coming along nicely. Serial port control, and can now set up the WiFi via serial port. No need for the embedded AP name and password any more...
© 2021 Rick Murray |
This web page is licenced for your personal, private, non-commercial use only. No automated processing by advertising systems is permitted. RIPA notice: No consent is given for interception of page transmission. |