-
• #1177
Definitely interested, any background reading links for starters?
-
• #1178
Not that I know off the cuff but will take a look and let you know. I'd imagine a lot of it gets quickly bogged down in maths and theory which imo isn't so critical just to use it! You can get excited about learning opencv though, was an absolute pain to install and use last time I touched it
-
• #1179
will take a look and let you know. I'd imagine a lot of it gets quickly bogged down in maths and theory which imo isn't so critical just to use it!
Thanks! Could be well out of my depth quickly, lol.
You can get excited about learning opencv though, was an absolute pain to install and use last time I touched it
Sounds like fun!
-
• #1180
Anyone want a Pi-Hut TV case (for Pi4) & Pi TV tuner card?
Pi not included! ~ Si
2 Attachments
-
• #1181
Raspberry Pi social media in meltdown following their proud announcement of hiring an ex-policeman who used to build Pi-based surveillance devices. Link might be slow because it’s running on a Raspberry Pi, which may well be literally melting, hence mirror:
https://raspberrypi.social/@Raspberry_Pi/109476972427437410 —mirror
Edit: also, I think today is their corporate Christmas bash, whoops
-
• #1182
This looks interesting if a little above my capacity!
-
• #1183
I've got a Pi Zero W connected to a hyperpixel display.
The plan is to have it load a web page from home assistant so I can control a couple of things.
Issue is that it doesn't seem to be able to load a webpage. I've got chromium set to autostart and that works but whatever website I put in it just shows Loading and a white page. Some suggestions online that a Pi Zero doesn't have enough grunt to load a webpage but don't know how true that is. Any suggestions? Cheers
-
• #1184
They don't have much grunt for sure. Zero 2 might fare better but still likely be quite slow. You might get further improvements by ditching chromium for something lighter.
Here's old chat on the subject: https://forums.raspberrypi.com/viewtopic.php?t=192868
-
• #1185
Cheers. I tried exactly the same thing with a 3B I had spare and that worked fine so I suspect it's down to the pi zero.
I'm guessing it's impossible to buy a zero 2 so need to work out whether a 3b will fit in the gap I have. Will need to find a short gpio cable from somewhere.
-
• #1186
I have this unused if any good. Thats the first time out of the packet, as I got a P4 instead.
2 Attachments
-
• #1187
Ignore, picnic.
In other news, I'm switching the pi4 night camera to 64bit and starting to make use of the new Picamera2 library.
-
• #1188
Cheers but a bit of further reading suggests that the lack of ram is the problem so it's the same on the zero 2 as well.
-
• #1189
Auto focus on camera modules...
https://www.raspberrypi.com/news/new-autofocus-camera-modules/
-
• #1190
Wow, it's amazingly fast! https://www.youtube.com/watch?v=KPq_6Do24XA
-
• #1191
Yes, should make bird feeder cam much more functional!
-
• #1192
Looking at learning about API query via Python.
Using live bus data from data.bus-dft.gov.uk that says it ouputs in json. https://data.bus-data.dft.gov.uk/guidance/requirements/?section=api
I get status code 200 and can view the data via both url in browser or via print(response.text) but as soon as I try any of the entry level json lines in the script it fails:
Script example:
import requests url = 'https://data.bus-data.dft.gov.uk/api/v1/datafeed/1695/?api_key=***' response = requests.get(url) print("Status code:", response.status_code) try: print(response.json()) except ValueError: # includes simplejson.decoder.JSONDecodeError print('Decoding JSON has failed')
Error without the try/except bit, I.e. just keeping print(response.json())
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I can't find a relatable solution to this anywhere other than suggestions the results aren't JSON?
Has anyone here messed around with dft data and found it behaves like this?
All the online docs suggest this is a really simple concept but as always I quickly run out of ideas when it comes to trying to learn in practice. Feels like it should be a 1 minute "oh yeah thats cool" early learning step surely?
-
• #1193
Have you got a screenshot of the raw data in browser? Does sound like there's something up with the data itself
-
• #1194
Example of earlier test that worked fine:
import requests # Making a get request response = requests.get('https://api.github.com') print("Status code:", response.status_code) # print response print(response) # print json content print(response.json())
-
• #1195
Gimme 5
-
• #1196
Here's the screenshot, thanks
1 Attachment
-
• #1197
I hadn't checked api.github.com output via url in browser, it is very different i can see. I see why I'm maybe struggling. Why would the dft make it not be json but say it is?
Edit: is there a conversion step to make it usable?
-
• #1198
It looks like it might be returning an xml rather than json file!
Why would the dft make it not be json but say it is?
Sometimes stuff is just documented badly unfortunately. Two things:
- you might be able to check the returned data type with print(response.headers['Content-Type'])
- you might be able to define the format you'd like the data returned in in the requests.get line, with another parameter (not 100% sure on this though i'm googling now as I'm procrastinating away from my budget spreadsheet...)
- you might be able to check the returned data type with print(response.headers['Content-Type'])
-
• #1199
https://data.bus-data.dft.gov.uk/guidance/requirements/?section=dataformats
No mention of .json here for timetable, fares or location. Might just be a case of bad docs. -
• #1200
Thanks, that brings back text/xml as content type.
Looks to be conversion scripts for local files so I'll try to adapt e.g. xmltodict might work.
Resurrecting my project of a 5-a-side scoring thing to go on the side of the pitch and help keep score.
Rather than fight against driving 7-segment displays with MAX72xx chips I've wimped out and got a cheap 4" touchscreen that I can bolt on to the RPi4. I'll use that to get a quick prototype working and then bolt on the cameras, microphone and then a huge amount of work is going to be the post-processing work.