1979 Atari 800XL showing me the latest AI News via FujiNet - welcome to the FUTURE!
Okay, so as you saw in the previous article - the FujiNet device arrived, I plugged it in - I gave it a little whirl, I loaded a few things and pondered what to then do with it.
Well, I then decided to do something with it. Inspired by the weather API lookup and display app, I wondered if I could get it to call out to a node-red API that I'd custom written and get the resulting data and output it to the screen on the Atari 800 XL.
As this is version 0.1, I wasn't expecting miracles, not was I expecting it to be polished or pretty - I was just after pure function and I believe I achieved that.
So....after scanning a few online videos on good old YouTube and watching many side distraction videos along the way, I found a nice chap who was knowledgeable in all things Atari BASIC - yes, you don't need to code in C (yet), so long as you load up the right APP first! I confess I did forget that as part of the start of the video and did waste about 15mins wondering what on earth I had done wrong... and then the penny dropped - how did I magically think the SDK for the FujiNet was going to be accessed from BASIC? It needs to have a TSR (that's an acronym to test your age!) that the BASIC code interfaces with.
Long story short - I achieved what I wanted to prove.
Machine 1 - an HP G7 laptop running node-red listening on port 1880 for API /v1/news and that API when it receives a request makes a call out to openai.com/blog/rss.xml (oh yes, good old XML!). The response is received, parsed into JSON - well, why wouldn't you?...and then I just rip out the item:title values and append into a long string (for now) and then return that to the requester - in this case the Atari 800XL.
Sounds simple enough - so here's some photo's of that in action and a short video of it happening in real time. As the FujiNet is a wrapped up Arduino with WiFi you'd expect it to be fast - it is! it's just the Atari 800XL that takes a little bit of a delay writing the text out to the screen - but I kind of like that old fashioned terminal style output - reminds me of my first IT job working on VAX/VMS terminals.
The lovely super-simple node-red Flow showing connection to the above URL.
and there's the DEBUG output of the node-red Flow showing the request was received and the data that was being returned.
right...now to hook this thing up to a node-red flow that monitors my solar panels and/or my greenhouse project (that I'm going to work on this year!)
Comments
Post a Comment