Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



Maybe someone in the request a tiny app thread thinks this is a fun project.

Adbot
ADBOT LOVES YOU

Master Twig
Oct 25, 2007

I want to branch out and I'm going to stick with it.

Lockback posted:

So you can follow something like this for a start, modifying the "wrong number" portion is reasonably easy to follow:
https://www.codespeedy.com/how-to-create-a-countdown-in-python/

I'd do this first on your PC to get used to programming Python.

Here is a tutorial to do a simple hello world for the Pi
https://www.seeedstudio.com/blog/2020/01/14/how-to-create-and-run-a-raspberry-pi-python-program-beginners-tutorial/

Do both of those and you should be able to get your code running on the Pi like you want.

If you haven't run little code bits like this block off a couple hours to experiment on this. Honestly, regardless of what you do for a living this is time well spent. Once you do this if you find this is something interesting you can build more complex things pretty easily

This seems a lot more manageable. Gonna start going through these links and experimenting. Thanks!

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass

Master Twig posted:

I have a request for assistance involving a raspberry pi. Not sure if this is the right thread, but it seems my best option.

So, I have a Raspberry Pi that i have never used. A techie friend of mine gave it to me several years back and I never ended up using it. However, I now have a potential use for it and I have no idea how to get it to do what I want, though I believe it's something that someone who knows what they're doing would have no trouble pogramming.

I'm currently building an Escape Room. The theme is that the players are special agents infiltrating a mad scientist's lab, and they get trapped inside and he has initiated the self destruct mechanism. The goal being to disable the self destruct mechanism before it blow.

So, where I want the Pi to come into play, is to have it hooked up to a monitor with the countdown timer displayed. Beneath that would be an input box in which the players would have to enter the correct passcode to stop the timer. Enter the right code, the timer stops. The group wins. Enter the wrong code, and the clock goes down by 2 minutes. If the timer reaches zero, it would turn into an image of a bomb going off and have a bomb sound effect or something.

Is this something that could be easily done? Would it be easy for me to learn how to do it, with absolutely zero programming experience? Would any goons be willing to program it for me? If so, I'd be willing to pay you.

My take, what you're describing is much more easily done with a webpage. You can pick up enough HTML and javascript in a couple days of beginner tutorials and have it working great. Then just use a laptop or even a Pi to display the page on the monitor. But the pi kinda sucks as a computer replacement for people that don't want to gently caress around with computers (i.e. people setting up an escape room). The microSD card storage is very easily corrupted if you don't take precautions to shutdown the pi gracefully. Getting it setup onto wifi and the internet is a big pain pulling out a mouse and keyboard. Compare to grabbing a junky old laptop and bing bong anyone is able to get it up and running instantly.

Also writing a fullscreen GUI to take input and show images isn't trivial for a beginner to programming. Python would be a great choice but you're going to run into a bunch of rough edges and bad advice googling for "python GUI". You'll find decades old crap like Tcl/Tk, very confusing and professional stuff like Qt, and if you're lucky someone pointing you to SDL and PyGame (what you should use for this). But even using PyGame you're going to do so much more work vs. a simple webpage. You'll need to worry about loading assets (images, etc.), animations, handling input, etc. If you do this in HTML and javascript it can probably be 5 lines of code or less. Something in PyGame is going to be at least 100 lines.

mod sassinator fucked around with this message at 19:42 on Apr 6, 2020

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
A monitor, a long HDMI cable, a long USB extension and a USB keypad would probably be best. Use mod sassinator's idea of making a webpage. Look up some javascript tutorials on countdown clocks and user input. Open up the webpage, press F11, and it's full screen and good to go.

Master Twig
Oct 25, 2007

I want to branch out and I'm going to stick with it.
Yeah, that seems WAY easier. I'm even finding a few HTML and Javascript countdown timers that are ready to go.

I did get my Pi set up and running. Seems like it's running pretty well. OS boots up without any issue. I'm reading up on HTML and Java Countdown timers. Seems a lot easier to get that going, and to have the GUI that I want.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
CSS is a lot easier to do exactly what you want compared to python GUIs.

xtal
Jan 9, 2011

by Fluffdaddy
You can also set up the browser to start in kiosk mode, with the local HTML page as the homepage. Great idea.

bolind
Jun 19, 2005



Pillbug
There was some discussion upthread about what to use an OG Pi 1 for. I just threw a fresh raspbian and raspotify on mine and it works splendidly as a Spotify Connect thingie, providing USB audio to my active speakers.

CPU load sits right around 35% so it remains to be seen whether I’ll see glitches if the Pi decides to do some maintenance, but so far so good.

I’m honestly amazed of how easy that whole thing went together. Only thing not plug and play was that I had to explicitly tell ALSA to use the USB sound card instead of the default.

eddiewalker
Apr 28, 2004

Arrrr ye landlubber

bolind posted:

There was some discussion upthread about what to use an OG Pi 1 for. I just threw a fresh raspbian and raspotify on mine and it works splendidly as a Spotify Connect thingie, providing USB audio to my active speakers.

CPU load sits right around 35% so it remains to be seen whether I’ll see glitches if the Pi decides to do some maintenance, but so far so good.

I’m honestly amazed of how easy that whole thing went together. Only thing not plug and play was that I had to explicitly tell ALSA to use the USB sound card instead of the default.

If you want something even easier, Volumio is great. It creates a hotspot on first boot for GUI setup, then has Airplay, Spotify, etc very well optimized.

KOTEX GOD OF BLOOD
Jul 7, 2012

mod sassinator posted:

Oh that reminds me I saw a great post about the benefits of fish shell and have been meaning to check it out: https://jvns.ca/blog/2017/04/23/the-fish-shell-is-awesome/

quote:

also apparently it automatically generates completions by parsing man pages? that’s so smart and amazing. I just learned that today!
okay that's cool as hell, I'm installing this.

Warbird
May 23, 2012

America's Favorite Dumbass

Oh it’s a great shell, especially the newer versions. It makes running scripts a bit annoying if you don’t remember to execute them via bash, but I’m sure there’s some better way that I’m not think of to handle it.

KOTEX GOD OF BLOOD
Jul 7, 2012

the scripts I run are all on my NAS, I assume it'll still go into bash when I ssh into it?

Klyith
Aug 3, 2007

GBS Pledge Week

eddiewalker posted:

If you want something even easier, Volumio is great. It creates a hotspot on first boot for GUI setup, then has Airplay, Spotify, etc very well optimized.

Co-signed, I like volumio a lot overall. Mildly annoyed by their recent trend towards a more commercial offering with a subscription service / pushing tidal (lol). It's not obnoxious, but new features are starting to get put behind the subscription. But hey, people gotta eat.

Also I don't like the new v3 UI, but that's because I have an old phone with a 720p screen.


The one caution I'd have with Volumio: it has zero security, so it is unsuitable for anything but your own private home network. You can change the ssh password, but that breaks plugins. And it's impossible to permanently disable ssh (the on/off switch is on an unprotected webpage).

Warbird
May 23, 2012

America's Favorite Dumbass

KOTEX GOD OF BLOOD posted:

the scripts I run are all on my NAS, I assume it'll still go into bash when I ssh into it?

That should be the case. You’re operating from with the NAS’s OS at that point so no fish unless you install it there and change your settings to default to it.

KOTEX GOD OF BLOOD
Jul 7, 2012

eddiewalker posted:

If you want something even easier, Volumio is great. It creates a hotspot on first boot for GUI setup, then has Airplay, Spotify, etc very well optimized.
another cool thing this thread has introduced me to today! how well does it handle classical music tags?

Klyith
Aug 3, 2007

GBS Pledge Week

KOTEX GOD OF BLOOD posted:

another cool thing this thread has introduced me to today! how well does it handle classical music tags?

Not great. Library organization is basic, the standard browser only presents things by artist/album/genre or folder structure. And I just tried to search for something I have with composer & performer tags, no dice.

a primate
Jun 2, 2010

Has anyone ever accidentally deleted the partitions on an SD drive?

I am a moron and did this, and now it’s showing 0bytes and won’t let me format it.

E: welp, I fixed it using the SD Card Formatter from sdcard.org. Saved me $25

a primate fucked around with this message at 17:49 on Apr 8, 2020

bolind
Jun 19, 2005



Pillbug

a primate posted:

Has anyone ever accidentally deleted the partitions on an SD drive?

I am a moron and did this, and now it’s showing 0bytes and won’t let me format it.

E: welp, I fixed it using the SD Card Formatter from sdcard.org. Saved me $25

Yup, there’s some fuckery with windows and as cards at times where the sdcard.org one is the only one that gets poo poo done.

It might not even be you, I’ve seen cards that, once raspbian had been written to them once, windows refused to work with them.

wolrah
May 8, 2006
what?
Windows assumes that all removable drives have a single partition and it does stupid things when that's not the case.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Windows also assumes that if it doesn't know what the partition format is, that it must be unformatted.

Steakandchips
Apr 30, 2009

Disk Management in Windows10 allows you to fix SD card partitions (I say fix, i.e., flatten all existing partitions and make everything one big one).

Question: What's the next step up from a raspberry pi that is more powerful and can use a 2.5" ssd? A NUC? Most NUCs are a bit of a big jump in price from a pi.

Warbird
May 23, 2012

America's Favorite Dumbass

There are a few different fairly powerful system on a chip solutions out there. Beagle boards and BananaPi come to mind. Not sure how they play in the $ to power ratio though.

CatHorse
Jan 5, 2008

Steakandchips posted:

Question: What's the next step up from a raspberry pi that is more powerful and can use a 2.5" ssd? A NUC? Most NUCs are a bit of a big jump in price from a pi.

At this point Raspberry 4 is among the fastest ones (CPU side) in the below 100$. RockPro64 might be faster and has crypto extensions enabled. All other ARM based ones are slower or much more expensive.

CatHorse fucked around with this message at 15:07 on Apr 9, 2020

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Steakandchips posted:

Question: What's the next step up from a raspberry pi that is more powerful and can use a 2.5" ssd? A NUC? Most NUCs are a bit of a big jump in price from a pi.

You can get used ultra-small form factor desktops for really cheap, or you can be like me and ebay a used i5 NUC for $140. At the point where you want good SSD performance, you likely want a full blown x86 computer, of which plain old corporate desktops will be cheapest.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

I agree with Twerk, 5-8 year old corporate desktops or laptops are the best deal for a full pc. They are cheaper than a single board computer which could be considered the next step above something like an RPi. A thinkcentre tiny, HP/Dell SFF, or thinkpad might be a good choice. If you need GPIO or industrial bus support, the SBC might end up being a better deal

Guitarchitect
Nov 8, 2003

Hoping someone can help... I set up a Pi 3 a while back as a retro emulator and then repurposed it as a home automation controller (homeseer) so my knowledge of Linux is rather sparse.

When I try to boot, I just get a rainbow screen. How do I troubleshoot this? At first I read that I might be able to change my config.txt file to include "boot_delay=1" and that might help, but I can't even modify the config file as the microSD is write-protected (I'm accessing it from windows since Linux won't start). I don't even know if that's the correct thing to do. I previously had my database for Homeseer corrupted, is the rainbow screen an indication that the SD card is hosed? I tried to run an analysis tool but it too got annoyed that the SD card seems to be write-protected...

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
I think if you get stuck at the rainbow screen, that means you aren't getting enough power.

Edit: It's either the power supply isn't good enough or that the image on the SD card is borked.

a primate
Jun 2, 2010

Cojawfee posted:

I think if you get stuck at the rainbow screen, that means you aren't getting enough power.

Edit: It's either the power supply isn't good enough or that the image on the SD card is borked.

This happened to me and it wasn’t the power supply, it was the image that was borked but ymmv

Have you tried re-imaging?

a primate
Jun 2, 2010

Is there any hard and fast rule for ROMs? I’m trying to get .smc files and some .z64 files to run on a retropie but I heard that they have to be binary? I have a 3 B+ if that matters

TVs Ian
Jun 1, 2000

Such graceful, delicate creatures.

Guitarchitect posted:

Hoping someone can help... I set up a Pi 3 a while back as a retro emulator and then repurposed it as a home automation controller (homeseer) so my knowledge of Linux is rather sparse.

When I try to boot, I just get a rainbow screen. How do I troubleshoot this? At first I read that I might be able to change my config.txt file to include "boot_delay=1" and that might help, but I can't even modify the config file as the microSD is write-protected (I'm accessing it from windows since Linux won't start). I don't even know if that's the correct thing to do. I previously had my database for Homeseer corrupted, is the rainbow screen an indication that the SD card is hosed? I tried to run an analysis tool but it too got annoyed that the SD card seems to be write-protected...

Grab a second SD card and a USB SD card reader. Write a base Pi image to the new card and see if it boots.

If so, put the original card into the USB reader and plug it into the Pi. Windows is flaky about the Linux formatted cards, but you should be able to run the tools on the Pi to check the card. I had one that kept killing some kind of allocation table, and running whatever the linux equivalent of CHKDSK was (fsck maybe? It's been a while) would make it bootable again.

Guitarchitect
Nov 8, 2003

TVs Ian posted:

Grab a second SD card and a USB SD card reader. Write a base Pi image to the new card and see if it boots.

If so, put the original card into the USB reader and plug it into the Pi. Windows is flaky about the Linux formatted cards, but you should be able to run the tools on the Pi to check the card. I had one that kept killing some kind of allocation table, and running whatever the linux equivalent of CHKDSK was (fsck maybe? It's been a while) would make it bootable again.

I will definitely try this!
I recall some talk earlier in the thread about how it's better to put everything onto a non-SD card... i'll probably just do that since the corrupted config earlier was a bit of a PITA.
is best practice to use a thumb drive or something else? I have a tonne of USB drives kicking around so it'd be sort of annoying if I needed a a proper SSD! 16gb is really everything i need...

Progressive JPEG
Feb 19, 2003

Thumb drives are very slow, an SD card would likely still be faster.

If you have a Pi4 then you can get very good performance from a USB3 to SATA adapter like this one, due to the Pi4’s two USB3 ports. I have only used this with SSDs, a spinning drive would probably need more power.

Edit: going by the docs the Pi4 still can’t boot directly from USB so you would likely still need a cheap SD card to boot from.

Progressive JPEG fucked around with this message at 00:55 on Apr 11, 2020

Guitarchitect
Nov 8, 2003

Progressive JPEG posted:

Thumb drives are very slow, an SD card would likely still be faster.

If you have a Pi4 then you can get very good performance from a USB3 to SATA adapter like this one, due to the Pi4’s two USB3 ports. I have only used this with SSDs, a spinning drive would probably need more power.

Alas, it's a 3B so I'm limited to USB 2.0 speeds.
I think what I might try to do is get the log file(s) onto a thumb drive but keep the os/software working off a new SD card. That way the whole OS and software don't get borked when the SD card eventually fails.
It's annoying because I really don't need more than like 2gb, so it's a lot of wasted money/space on an SSD... even though that seems like it would be the best solution.

evil_bunnY
Apr 2, 2003

If you write logs to a thumb drive you’ll kill it dead the same way you do the card. They’re not meant to take all day IO.

WarMECH
Dec 23, 2004
I just got a Pi4 this week to run Pi-Hole. It is in the "official" case, which has no vents/fans. Everything works great, better than expected, but I noticed that the web interface for Pi-Hole is showing that my temps are running between 62 and 65 C with a little "hot" icon next to it. Will this hurt in the long run? The only thing running on the device is the Pi-Hole software and it's managing my small home network of about 18 devices, so it shouldn't be working hard.

evil_bunnY
Apr 2, 2003

WarMECH posted:

I just got a Pi4 this week to run Pi-Hole. It is in the "official" case, which has no vents/fans. Everything works great, better than expected, but I noticed that the web interface for Pi-Hole is showing that my temps are running between 62 and 65 C with a little "hot" icon next to it. Will this hurt in the long run? The only thing running on the device is the Pi-Hole software and it's managing my small home network of about 18 devices, so it shouldn't be working hard.
I wouldn't give a poo poo but if you do you can buy a small 5V fan, provided you have the power overhead.

mewse
May 2, 2006

WarMECH posted:

I just got a Pi4 this week to run Pi-Hole. It is in the "official" case, which has no vents/fans. Everything works great, better than expected, but I noticed that the web interface for Pi-Hole is showing that my temps are running between 62 and 65 C with a little "hot" icon next to it. Will this hurt in the long run? The only thing running on the device is the Pi-Hole software and it's managing my small home network of about 18 devices, so it shouldn't be working hard.

Pi4 is huge overkill to run pi-hole, I have it running responsively on a first gen pi B.

The 4 runs hotter than previous models, if you throw heatsinks on it, it will probably calm down. The temp warnings baked into pi hole are almost certainly not accounting for pi 4 temps.

Raygereio
Nov 12, 2012

WarMECH posted:

I just got a Pi4 this week to run Pi-Hole. It is in the "official" case, which has no vents/fans. Everything works great, better than expected, but I noticed that the web interface for Pi-Hole is showing that my temps are running between 62 and 65 C with a little "hot" icon next to it. Will this hurt in the long run? The only thing running on the device is the Pi-Hole software and it's managing my small home network of about 18 devices, so it shouldn't be working hard.
The official case is kind of lovely to be honest. If you get case with a decent heatsink build into it and make sure the Pi4 isn't placed in a closed closet, you can probably cut that temperature with 10 to 20 degrees.
The Pi4 will protect itself by throttling the CPU at around 80°c. But if you're just running PiHole I doubt you'll ever see those temperatures. So I wouldn't bother with a fan.

WarMECH
Dec 23, 2004
Thanks guys. I got a deal on a Pi4 knowing it is overkill for Pi-Hole, but figured I could use it for something else in the future if I wanted. I'll just let it go for now, the temps are always in that range but never go higher than 65C. I have it sitting on an open bookshelf but the lovely case has no vents which is kind of weird. Had I known that before ordering the kit I would have bought a better case.

Adbot
ADBOT LOVES YOU

Eletriarnation
Apr 6, 2005

People don't appreciate the substance of things...
objects in space.


Oven Wrangler
I don't think 65C is a problem for a Pi4, but I read about the temps being higher and got the FLIRC case for mine. It's made of aluminum and has good contact with the chip so it's a pretty effective heatsink.

mewse posted:

Pi4 is huge overkill to run pi-hole, I have it running responsively on a first gen pi B.

Yeah, I'm using a 2B for pihole and it's basically just idling at <1%. It makes sense, it's not like DNS is a complicated service or like I have a lot of concurrent users in my house. I tried to think of something else to run on it but I already have a quad-core Xeon doing most of that stuff, I just didn't want to make DHCP+DNS reliant on my VM sandbox.

Eletriarnation fucked around with this message at 13:37 on Apr 13, 2020

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply