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 original RSS XML feed data shown in a web-browser.

The lovely super-simple node-red Flow showing connection to the above URL.

Awh....the lovely Atari 800XL with the BASIC code in full view.


Thought I'd just test the node-red API call from a different laptop (Honor laptop), just to prove it is available over the network.


RUN
and there we have it, the text is streaming out to the screen via the FujiNet!
There is a minor bug when the data transmission finishes it still attempts to be getting more data - I suspect that is in relation to the usage of '\n' in the string I'm sending back and the OPEN #1,12,x - where x is set to 3 at the moment and it could be 0,1,2,3 - so some fiddling around might be needed.


and there's the DEBUG output of the node-red Flow showing the request was received and the data that was being returned.

AWESOME - now watch it in a video:



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