|
ante posted:What the gently caress, don't buy that, just cut up a 30 cent USB cable from eBay and solder on some female headers. I did mention the cable+wire cutter method. Had mediocre luck with it in the past, but also not had much practice. I think of it as the zero-cost option, because I assume wire cutters and USB cables are just present, at all times, in sufficient amounts.
|
# ? Oct 2, 2015 09:04 |
|
|
# ? Apr 20, 2024 04:21 |
|
Alehkhs posted:Is there anyone out there with a Pi2 and a 90-degree micro usb power cable/adapter (something like this)?
|
# ? Oct 2, 2015 09:20 |
|
nmfree posted:I measured, and the 90° adapter I have sticks out 11-12mm. drat. Thanks for checking though! Well, all I'm looking to do is basically set up a trail camera running off of a usb charger - which will hopefully run the thing for close to a day(?). It'll be watching always, but only record when it senses movement. Would I even need a Pi2 for that, or would a PiA or PiB be better/fine (the Pi B+ is when the power port moved)? Also, anyone have any experience with that sort of remote-powering and motion-sensory? I know there's been a couple camera projects, but they seemed to wire back into a house and continuously stream/record. Alehkhs fucked around with this message at 18:12 on Oct 2, 2015 |
# ? Oct 2, 2015 18:09 |
|
Moey posted:Nice! I would love to do this at one point (once I have a bar to plop it on). Hey, I'm working on one of those too! I'm making a few modifications though (namely making it a bit wider). Drawing the whole thing up in Sketchup is really helping. Still not sure how the marquee is attached though.
|
# ? Oct 2, 2015 19:44 |
|
A Proper Uppercut posted:Hey, I'm working on one of those too! I'm making a few modifications though (namely making it a bit wider). Drawing the whole thing up in Sketchup is really helping. I went with a widescreen monitor. Should give move room for splitting the two player setup. My stepfather heard about my project and wants me to build him one with the old Williams classic arcade setup. Look at this abomination:
|
# ? Oct 2, 2015 20:42 |
|
floor is lava posted:I went with a widescreen monitor. Should give move room for splitting the two player setup. My stepfather heard about my project and wants me to build him one with the old Williams classic arcade setup. Haha that's so 80's/early 90's, drat. I didn't go with a widescreen just because I didn't want black bars or poo poo to be stretched out. Maybe my thinking was wrong on that. I'm just hoping having a few more inches on either side of the 4:3 monitor won't look dumb. Hell it was only $30 on ebay either way. Does the MAME thread not exist anymore? A Proper Uppercut fucked around with this message at 20:50 on Oct 2, 2015 |
# ? Oct 2, 2015 20:47 |
|
Alehkhs posted:drat. Thanks for checking though! The one time I checked, I was able to run a Pi B+ for ~7 hours off one of those cell chargers that hold two li-ion batteries. That was doing nothing but hooked up to a TV showing the desktop. You'll get significantly lower usage if you're taking pictures and doing processing on them or whatever. Just something to help you ballpark the size of the stack of batteries you'll need. I also recommend you use one of the Pi Cameras, and search around for how others have done motion sensing. Without any research, I personally would use OpenCV to take a picture every minute or whatever and compare differences to decide whether or not to store it, but people that have actually sat down and thought about it might have come up with way better solutions. I think the A had one of the camera connectors? If it did, that's the one you'll want to go with, probably. Image processing will take longer, but lower power usage overall.
|
# ? Oct 3, 2015 00:38 |
|
Paul MaudDib posted:Most people got blinded by the $35 (plus $75 of other stuff) pricetag and underestimated the performance implications, myself included. I think very few people anticipated how quickly they can burn up an SD card. You really really need to do the thing you linked to be assured of long-term stability. I bought a liva recently that I installed Ubuntu on and the performance has been great, but the case is a piece of garbage. When snapped shut the power button doesn't work correctly, and taking it back apart frequently results in broken clips. The green power LED on the front of mine was really poorly attached to the board and also doesn't work.
|
# ? Oct 4, 2015 16:37 |
|
Back to SD Card questions, I wonder if Raspbian is designed not to do unnecessary disk writes, like with log files and stuff? I know very little about Linux, so I don't know what the average stripped down Debian does in terms of background disk writes. The lesson's clear not to use a Pi for anything mission critical, but I wonder if I shouldn't just image my RetriPie image right now. It's just sitting there, infected with some digital alheimers that's killing it day by day
|
# ? Oct 4, 2015 18:51 |
|
doctorfrog posted:Back to SD Card questions, I wonder if Raspbian is designed not to do unnecessary disk writes, like with log files and stuff? I know very little about Linux, so I don't know what the average stripped down Debian does in terms of background disk writes. quote:The lesson's clear not to use a Pi for anything mission critical, but I wonder if I shouldn't just image my RetriPie image right now. It's just sitting there, infected with some digital alheimers that's killing it day by day Yep! I don't know if retropie saves high scores or anything, but you could also set everything on the SD card to read-only, if you're cool with all the implications of that
|
# ? Oct 4, 2015 19:30 |
|
Hi thread, I was hoping you could point me in the right direction. I've been thinking of getting a Pi, but I'm not sure if I'd be better off with an arduino or something, and really I don't know the difference (computer vs. microprocessor). I was going to use this as an opportunity to learn some new stuff like babby's first introduction to linux, mysql, apache, programming, electronics, etc. My day job right now is a database developer, though I use a fisher price software (Filemaker) compared to the real stuff like SQL/Oracle. So I'm already familiar with database schemas and high-level programming, but it would be fun to learn something new. Project Idea 1: To start, I was going to try and have two temperature sensors log readings to a mysql database every minute / 5 minutes / whatever to basically just log the temperature in our house vs. our basement or outside. No real reason other than "hey this should be an easy enough intro". Ultimately in a perfect world I would have a database logging all sorts of stuff, interacting with my calendar, weather and whatever other APIs so I could have a dashboard specific to me. Maybe I could monitor my electrical useage or process my YNAB data as well? All sorts of cool stuff! Project Idea 2: I'd like to have a device run a query against an existing existing database using ODBC/JDBC, and if there are "unread" records, then control a relay or whatever to turn a spinning police light on. The query would run every x seconds or so to determine whether the light should be on or off. Now, I'm not sure what devices would best suit my needs. I have an old PC laying around that I could probably throw ubuntu on, after reading the last few pages of "Pi's are pretty much garbage" it's the way I'm leaning (for project 1 at least) since eventually it could be running mySQL/Apache and whatever else I have to throw at it. Project 2 would be fine with a Pi, but maybe it's better suited to an arduino? I don't know.
|
# ? Oct 5, 2015 13:32 |
|
dreesemonkey posted:Hi thread, I was hoping you could point me in the right direction. I've been thinking of getting a Pi, but I'm not sure if I'd be better off with an arduino or something, and really I don't know the difference (computer vs. microprocessor). Use your old PC as your database and use the RPi for your sensors etc. You could also get a ethernet shield and use an arduino for the monitors but it's a bit tougher to code. The PI is great for lots of stuff, but mostly it's just great for tinkering and testing, or making arduino type toys with higher level languages.
|
# ? Oct 5, 2015 20:38 |
|
Yeah, it sounds like you're at the level where a Pi would be perfect for those projects. You don't need high reliability or anything, so you'll have a good time messing around. The problems you've been reading about are mostly overstated because we're trying to use it for serious projects where reflashing a card is a huge pain in the dick. Arduinos are a different beast entirely, and much lower-level, so standalone database stuff like that would be a difficult and unusual and slightly difficult. edit: If you want to turn temperature/whatever logging into a Really Cool Thing, then set up Grafana with InfluxDB on your spare desktop running Ubuntu, and send all your datapoints there with your Pi. ante fucked around with this message at 00:12 on Oct 6, 2015 |
# ? Oct 6, 2015 00:10 |
|
Hadlock posted:I guess AliExpress is selling a stripper model of the quad core Orange Pi for $18.53 shipped to the USA Ok my Orange Pi PC came in but it won't boot if you feed it 5V DC in to the GPIO like the Pi will. I'm guessing it has something to do with the power switch being wired a certain way. It doesn't take Mini USB for some reason (?!?) and instead uses some teensy tinsy 5V barrel adapter that's totally incompatible with all my Arduino barrel adapter stuff. Is there a way to roll your own barrel adapter? I'm tempted to just unsolder the barrel jack and replace it with two header pins and call it a day. Thoughts?
|
# ? Oct 6, 2015 06:55 |
|
I'm sad to report the MotionPie software doesn't seem to be up to the task as a long-term security camera. I'm still optimistic finding the right settings will alleviate my problems, but I think I may be asking too much of it. The software is too unstable. It can occasionally glitch out and ignore motion or forget to stop recording. I can't seem to find a way to get it to record 24/7, so I have it set taking a photo every five seconds and relying on motion-activated video to catch important events. This can (understandably) lead to 15,000+ photos a day, which was giving me around 1.5GB a day at full resolution including videos. This was a significant problem since large amounts of videos confused the web UI, causing timeouts and forcing me to delete archives through SSH to clear up enough space for it to allow photo preview again. It has also crashed several times for unknown issues and I've had to reboot it through SSH several times, long-term mounting could make this situation very complicated if the plug is in an inconvenient spot. Also, motion-detection seems to be very processor-heavy and I get maybe 3 frames/sec with motion-detection enabled regardless of any still-images being taken. Finally, the biggest issue I'm struggling dealing with is that the software doesn't have an easy way to backup photos to another computer that I'm aware of. I'm currently looking into a workaround to this, but a security camera is useless if the videos can be stolen along with the camera. There are several positive things I like about this software: Time-lapse photos and wildlife observation can benefit very highly from a camera like this. I may be asking too much from his software and I know a one-man project that doesn't make financial gains is going to suffer from bugs, and the UI is pretty awesome to work with. I'm hoping to get some more time with the camera and try to find settings that work, but as of now it's currently recording the rain to make time-lapse videos during the day and it's pretty fun to watch, so I consider that a win.
|
# ? Oct 6, 2015 07:28 |
|
durtan posted:I'm sad to report the MotionPie software doesn't seem to be up to the task as a long-term security camera. I'm still optimistic finding the right settings will alleviate my problems, but I think I may be asking too much of it. The only one I can suggest something for is the backup. If you've got network access to it, set up a share on another machine on the same network, mount it on the Pi, and either have all of the data directly write to the remote machine (it may actually be faster than a local write, depending on what media you have attached), or set up a cron job to move data over to it periodically. And then another job for archiving/deleting.
|
# ? Oct 6, 2015 12:32 |
|
Or, of course, rsync.
|
# ? Oct 6, 2015 14:15 |
|
ElCondemn posted:Use your old PC as your database and use the RPi for your sensors etc. You could also get a ethernet shield and use an arduino for the monitors but it's a bit tougher to code. The PI is great for lots of stuff, but mostly it's just great for tinkering and testing, or making arduino type toys with higher level languages. ante posted:Yeah, it sounds like you're at the level where a Pi would be perfect for those projects. You don't need high reliability or anything, so you'll have a good time messing around. The problems you've been reading about are mostly overstated because we're trying to use it for serious projects where reflashing a card is a huge pain in the dick. Thanks for the advice, is there any Pi model that I should avoid or just buy the best one?
|
# ? Oct 6, 2015 20:35 |
|
There's really only the Pi 2 (same footprint as B+) and A+ now. Get the Pi 2.
|
# ? Oct 7, 2015 00:05 |
|
dreesemonkey posted:Thanks for the advice, is there any Pi model that I should avoid or just buy the best one? Gonna piggyback off this and say that there's absolutely no reason to use an old PC for the other stuff when you can run a VM on your current PC. If you want something gruntier and always on, there are a bunch of <$100 boards that have SATA and enough memory to handle hobby databases while taking about the same amount of space and power as the pi, and running stock Ubuntu/Fedora images. If you want something less sensitive, consider pairing it with a mic or a proximity sensor (IR, ultrasonic, lidar, whatever). Or just doing edge detection, which motionpie is hopefully doing with opencv, but I dunno
|
# ? Oct 7, 2015 00:49 |
|
dreesemonkey posted:Hi thread, I was hoping you could point me in the right direction. I've been thinking of getting a Pi, but I'm not sure if I'd be better off with an arduino or something, and really I don't know the difference (computer vs. microprocessor). Yeah a Pi would work great for general linux hacking, a toaster can run linux on the command line. You could always just get a chromebook which already runs linux and drop down to the command line. Instant 12 hours battery life, great display, modern(ish) hardware. If you want to write your first python magnum opus or ruby on rails app talking to MariaDB, MySQL Postgresql etc on the back end you don't need much at all. When I was in middle and high school I loved having a bunch of displays on my desktop but today I find it kind of annoying. A dedicated laptop for that sort of thing (if you're serious about it) might be better than a VM, but I encourage you to download VMWare and a copy of Mint (Ubuntu + a sane GUI) and get cracking there. You might be surprised how smooth VMWare runs on your home pc. If you're running Windows Pro you can just flip a switch and run Hyper-V from the desktop
|
# ? Oct 7, 2015 06:17 |
|
I've made myself a script that I'll run with cron to regularly check if some of my services are running. The script works but I don't know how I can elevate the permissions of the script so it can properly run the service httpd status command. What would be the proper way of doing this? [user@linuxserver bin]$ service httpd status httpd status unknown due to insufficient privileges. [user@linuxserver bin]$ service sshd status /etc/init.d/sshd: line 33: /etc/sysconfig/sshd: Permission denied openssh-daemon (pid 1689) is running... code:
|
# ? Oct 8, 2015 05:01 |
|
Use the root crontab. sudo crontab -e
|
# ? Oct 8, 2015 05:34 |
|
Why?code:
Nicer still is to make a wrapper function. And bash can do this directly code:
|
# ? Oct 8, 2015 06:22 |
|
I just got my first Pi (2) last night and am planning on using it as an emulator. I was having some issues with speed so I went in to the overclocking options and noticed it was set (or at least looked that way) to 600 or 700mhz. Pi 2 was listed and I selected it. Is it normal that you have to change that?
|
# ? Oct 8, 2015 15:37 |
|
evol262 posted:Why? If I were to do something similar to this, won't it also give the user the ability to do something malicious like service httpd stop. Say I was writing this script and passing it off to an assistant. I want this guy to be able to restart and check the status of services that require elevated privileges with my script but not necessarily stop services just typing on the command line. I was looking at setuid but this looks like it'd be even worse. Anything run within that script would have elevated privileges. I could take give execute privileges without write privileges to the script so he can't put in code:
When an executable file has been given the setuid attribute, normal users on the system who have permission to execute this file gain the privileges of the user who owns the file (commonly root) within the created process. Ultimately I just ran the script through root's crontab rather than the basic user's crontab, which was exactly what I needed.
|
# ? Oct 8, 2015 18:18 |
|
Methanar posted:If I were to do something similar to this, won't it also give the user the ability to do something malicious like service httpd stop. You could write a trivial wrapper which checks positional arguments and pukes if it's not "status" or "restart", then make that writable by root only, and give sudo access to it, but systemctl is just nicer if you have access to it. Is it Fedora or EL7? Methanar posted:When an executable file has been given the setuid attribute, normal users on the system who have permission to execute this file gain the privileges of the user who owns the file (commonly root) within the created process. sudo doesn't care about aliases, but yeah, suid gives elevated privileges, which is why they're usually pretty restricted, and normal users can't write them. suid stuff is used all over the place in a default system, and making sure that users can't edit it and do whatever they want is a solved problem, and you know the answer: don't let users have write permissions. I mean, sure, running it through root's crontab works. But if you were going to hand it off to an assistant and wanted him to be able to do some stuff, emailing him about stopped services doesn't help a lot. More to the point, controlling access to things is pretty normal stuff. Sure, you can shove this in root's crontab. But then users who don't have root permissions can't check the status of the script, and can't restart services. It's not even close to the same problem. You asked for the "proper way" to elevate privileges, which is sudo access to systemctl/service (with a wrapper, if you don't want the user to the able to stop arbitrary services). Dumping it in root's crontab isn't really a proper way to do anything, unless your problem is "this needs root privileges". But then you already know you can run it as root, so what question did you answer?
|
# ? Oct 8, 2015 19:45 |
|
evol262 posted:Yes, it will, which is a specific limitation that the order of systemctl's (and initctl's) arguments is intended to solve. I'm not a Linux admin and don't know anything about Linux administration. I'm just screwing around and trying (poorly) to consider real world situations as I do this. In my case, since this isn't real production and I have root, my problems can be solved improperly by just crontabbing as root instead of a regular user. I made a mistake when I made it sound like the assistant example and elevating script permissions were the same issue. They weren't. The assistant example and security questions were just a tangent thoughts I had reading over your post. Thanks for your help and explanations.
|
# ? Oct 8, 2015 20:19 |
|
I wrote a reply to this, but the forum outage ate it. I didn't take your statements literally, just trying to pay it forward and give suggestions for when/if you may want to make it more flexibile
|
# ? Oct 9, 2015 04:11 |
|
MotionPie update: It appears changing the settings to reduce the amount of timelapse photos taken a day from every 5 seconds to 30 seconds has improved stability a lot. I guess it's a no-brainer that creating 10k+ photos daily might be too much to handle. I'm now generating around 500MB a day of video and photos and I can still access everything without the GUI crapping out. I'm still stress-testing the software by not deleting anything and it seems to do fairly well. I may permanently mount this camera after all.
|
# ? Oct 10, 2015 20:04 |
|
Which torrent client should I use with my Pi? It's running RetroPie and minidlna, but is idle a whole bunch, and torrents will be pretty light, maybe a couple GB downloaded a week onto an external flash drive. I'll be controlling it via SSH, don't care about longevity.
|
# ? Oct 11, 2015 09:19 |
|
doctorfrog posted:Which torrent client should I use with my Pi? It's running RetroPie and minidlna, but is idle a whole bunch, and torrents will be pretty light, maybe a couple GB downloaded a week onto an external flash drive. I'll be controlling it via SSH, don't care about longevity. Probably Transmission since it has a terminal client. There's also Deluge which has a web interface, but people seem to have issues at times though.
|
# ? Oct 11, 2015 09:33 |
|
I'm partial to rtorrent, which I just mess about with via ssh.
|
# ? Oct 11, 2015 22:55 |
|
Yea, rtorrent is the answer. If you want a front end for it, use RuTorrent.
|
# ? Oct 12, 2015 18:01 |
|
Is there a reason that Jetson TK1s go used for more than their retail? Is there something I'm missing, like fees / import duties (I'm US) / lead time? From my perspective this makes even less sense since I talked to someone at a conference who told me that many (all?) of the first wave of units had lovely memory bandwidth until the chip physically warmed up to a sufficient temperature. So in theory those should go for even less than a new board.
|
# ? Oct 20, 2015 00:11 |
|
Huh, getting emails requesting I resell my odroid-c1 back to the company so they can resell it. That is a bit silly.
Floor is lava fucked around with this message at 15:14 on Oct 20, 2015 |
# ? Oct 20, 2015 15:10 |
|
I have a 23" HDMI monitor I'm not really using anymore, and I had the idea to turn it into a tabletop virtual pinball machine by building a new pinball-table-shaped case for it and running The Pinball Arcade in vertical mode and wiring some arcade buttons into the case and some other buttons for menu navigation. I've seen a lot of people build arcade emulator machines etc, but I haven't seen anyone tackle this concept. (I'm also aware that a Pi can run a physical pinball table, but that's not what I'm proposing here.) There's no Linux version of TPA yet, but it's on Android, iOS, Steam, and just about every console. Am I hosed? Is the Pi even suitable for a job like this?
|
# ? Oct 21, 2015 01:08 |
|
The Raspberry Pi can run Android and output stuff to HDMI and read switches, so unless there are significant processor requirements, I'm not seeing an issuefloor is lava posted:Huh, getting emails requesting I resell my odroid-c1 back to the company so they can resell it. That is a bit silly. Huh?
|
# ? Oct 21, 2015 03:09 |
|
Is it possible to make an app for Android that will sned push notifications and play music when a Pi sends it a signal?
|
# ? Oct 21, 2015 18:40 |
|
|
# ? Apr 20, 2024 04:21 |
|
CashEnsign posted:Is it possible to make an app for Android that will sned push notifications and play music when a Pi sends it a signal? Yeah I would look at IFTTT (https://ifttt.com/). If you install their app on your Android device you can send it notifications, so that solves the Android notification half of it. Then check out their new Maker channel for an API to trigger IFTTT events so the Pi could tell IFTTT something happened, and then IFTTT would have a recipe that listens for that event from the Pi and sends an Android notification to your phone. You can do pretty much anything from IFTTT too--like send a SMS, tweet, etc.
|
# ? Oct 21, 2015 19:10 |