|
Post by spetersen on Dec 5, 2019 12:06:07 GMT
How are you running your programs? Desktop or command line? You should be able to get the player working while waiting for parts if you use an external amplifier and the 3.5mm jack
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 6, 2019 21:26:15 GMT
How are you running your programs? Desktop or command line? You should be able to get the player working while waiting for parts if you use an external amplifier and the 3.5mm jack I'm a Linux geek, so I'm going to set them up as a system service with systemd. They will run background on start. The player and everything will run command line, I'm not even installing the GUI.
|
|
scudie
Junior Member
Posts: 88
|
Post by scudie on Dec 6, 2019 21:38:54 GMT
Hi Scotk What is GUI? And why are you not installing it's?
Cheers Scudie
|
|
|
Post by spetersen on Dec 6, 2019 21:49:55 GMT
Gui is a desktop environment(point and click), it takes resources that are not needed to run the jukebox. CLI or command line interface is just typing in commands as text.
|
|
|
Post by spetersen on Dec 6, 2019 21:54:48 GMT
How are you running your programs? Desktop or command line? You should be able to get the player working while waiting for parts if you use an external amplifier and the 3.5mm jack I'm a Linux geek, so I'm going to set them up as a system service with systemd. They will run background on start. The player and everything will run command line, I'm not even installing the GUI. If you run the buttons program,(or a major part of it) and the program uses a large percentage of CPU time, the signal may be inverted from what I used.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 2:13:48 GMT
It's going to be in sleep most of the time. The CPU usage will be the same as yours. The only practical difference between yours and mine are that you're running it from cron and I'm running from systemd. It'll restart if it crashes without me doing anything.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 3:24:41 GMT
Hi Scotk What is GUI? And why are you not installing it's? Cheers Scudie Graphical User Interface. Like Scott P. said, it's the point and click part. Running with no monitor and keyboard/mouse it's really not needed. For Linux it's completely optional, unlike Microsoft Windows. Basically everything of mine is all command line, like using DOS years ago.
|
|
|
Post by spetersen on Dec 7, 2019 3:46:46 GMT
It's going to be in sleep most of the time. The CPU usage will be the same as yours. The only practical difference between yours and mine are that you're running it from cron and I'm running from systemd. It'll restart if it crashes without me doing anything. I'll have to look into that, i didn't know it would work that way. If the input is inverted the program will not sleep,and give random "pulse ignored " text output messages.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 3:52:20 GMT
Some pics of mine with the 24v transformer and 5v power supply mounted in the case. I need to mount the amp, and the optoisolator when it comes in the mail next week, and I'll have all the hardware. It's starting to come together! Attachments:
|
|
|
Post by spetersen on Dec 7, 2019 3:57:29 GMT
Lookin' good!
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 3:59:40 GMT
I haven't started on the pulse train yet, the coin drop reader and the volume button reader are reading inputs but that's all so far. I wanted to wait until I had the hardware all assembled before starting serious software work.
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 4:06:17 GMT
|
|
|
Post by spetersen on Dec 7, 2019 5:00:50 GMT
I've done about half of that, no swap, logs to memory, no update of file access times, but I left the system RW, figuring that there is almost no activity with the changes I made. The only writes I make are to the Queue.csv file,(on usb) and they are for a fraction of a second per song, so if accidentally unplugged, or power failure, should not likely be corrupted. I also setup static ip, so I can login without network access. I wish I had the smarts to make a gui type terminal program (like a dos program)to pick songs and write to the Queue file instead of nano. I have to look at Pygame and see if that could work. Because my Pi is mounted in the box in back, I store the programs on the USB which is accessible without opening up anything.(in case I make a nonbootable mistake)
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 13:29:27 GMT
Depends on the level of complexity you want, but if you're ok with simple it would be quite easy.
I haven't tried the following but it should work. Put it in .bashrc so it's run at login. Might want to create another user to try it with in case there's a problem with it.
QUEUEFILE=/home/pi/queue (or whatever the file path is) while true ; do echo "Select song number, q to quit, or s for shell:" read SONGNUMBER case ${SONGNUMBER} in s|S) break ;; q|Q) exit ;; *) echo ${SONGNUMBER} >> ${QUEUEFILE} ;; esac done
|
|
ScotK
Full Member
Posts: 113
|
Post by ScotK on Dec 7, 2019 14:04:35 GMT
Got both power supplies wired, checked the voltage from -5vDC to the chassis and got nothing but millivolts so I think my grounding problem is solved. I should be able to safely connect both the AC transformer and DC power supply negatives to the chassis.
|
|