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
TheresaJayne
Jul 1, 2011

peepsalot posted:

I want to play around with "high-speed" computer vision on a Pi3 or pi-like. I'm mainly wondering what the highest fps i can get (even if it is really low res). I see, for example some 2MP usb camera modules on ebay for $40 or so that claim to be capable of 120fps at lowered resolutions like 320x240.

Another option could be a mouse optical flow sensor, i know some are used to aid with quadcopter position holding, and have resolution of 30x30 for the common ADNS3080 chip. As I understand it, these chips process tens of thousands of frames a second for calculating flow data, but actually grabbing a frame off the chip is much slower, ~100fps tops if my rough calculation is correct, probably a lot less in practice?

So any particular recommendations for camera modules, and/or system to run them? With a total budget of ~$100 for computer + camera.

I have been trying to come up with a working concept for computer vision, and I have this suposition.

4 cameras

2x low res - movement detection
2xhigh res narrow pov moveable by the ai - the center vision similar to human vision so it can then see edges and detail.

Doing it this way means that the ai can notice movement to the side and swivel to look at whatever it is making up an image in memory by scanning small areas

Exactly like human vision works

Adbot
ADBOT LOVES YOU

Super Slash
Feb 20, 2006

You rang ?

GobiasIndustries posted:

Thank you! Worked like a charm.

In future you could use http://www.pibakery.org/ to pre-load an SD with what you want, of course you can edit the config files but it's nice to have things up and running from the get-go.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Two questions:

1. Is the Zero W fast enough for real time face recognition? I have no experience in this field but I'd like to begin dabbling in some computer vision stuff.

2. Can anyone recommend a case that fits the Zero W (or whatever is fast enough for face recog) and the camera? I guess it'd be cool if it had some provision for mounting, but I can jury-rig something...

edit: The answer to 1 seems to be "not really"...it can do about a face every 5 seconds. That's when it's trying to recognize the person (comparing to just one known face) from the face rather than just detecting faces.

Thermopyle fucked around with this message at 20:51 on Nov 9, 2017

Skarsnik
Oct 21, 2008

I...AM...RUUUDE!




Thermopyle posted:

Two questions:


2. Can anyone recommend a case that fits the Zero W (or whatever is fast enough for face recog) and the camera? I guess it'd be cool if it had some provision for mounting, but I can jury-rig something...



Not entirely serious answer but honestly this is the only zero plus camera setup you should be using

https://shop.pimoroni.com/collections/kits/products/octocam-pi-zero-w-project-kit




:3:

Drone
Aug 22, 2003

Incredible machine
:smug:


Probably the wrong thread for this, but I didn't see a more general microcomputing thread anywhere.

Is there a microcomputer in the same class as a Raspberry Pi that is built specifically with Windows architecture in mind? The background is that I kinda want to stick this WS4000 simulator onto a Pi-sized device and plug it into my TV for a my own private retro-authentic Weather Channel.

Otherwise I'll have to wait until the developer releases v4, which apparently has compatibility with debian-based Linux, so I assume it would run OK in Raspbian.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
Convert it to a uwp app and use the windows 10 iot build for raspberry pi

fishmech
Jul 16, 2006

by VideoGames
Salad Prong

Drone posted:

Probably the wrong thread for this, but I didn't see a more general microcomputing thread anywhere.

Is there a microcomputer in the same class as a Raspberry Pi that is built specifically with Windows architecture in mind? The background is that I kinda want to stick this WS4000 simulator onto a Pi-sized device and plug it into my TV for a my own private retro-authentic Weather Channel.

Otherwise I'll have to wait until the developer releases v4, which apparently has compatibility with debian-based Linux, so I assume it would run OK in Raspbian.
There's no microcomputer thread because it's no longer 1985 and people don't need to distinguish things from mini and mainframe computers. :v:

Intel sells these which are ~5 inch long sticks with an HDMI plug on one end to put in your TV, and they have a full x86-64 SoC that runs Windows fine https://www.intel.com/content/www/us/en/products/boards-kits/compute-stick.html

You can find similar devices from other manufacturers cheaper, but the Intel ones are real slick.

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
Use a little stick PC like the Intel compute stick: https://www.cdw.com/shop/products/I...g!513679693152!

Converting to a UWP app and using Win 10 IoT is a path of madness--it's pretty much a failed platform that Microsoft is backing away from too. Don't waste your time.

jokes
Dec 20, 2012

Uh... Kupo?

I have no idea what I'm doing wrong but I am 100% unable to connect to my PiVPN and it is frustrating the hell out of me. I got PiHole working with next to no problems but for some reason this PiVPN is rejecting all connections or something because I can't get any of my devices to connect.

Super Slash
Feb 20, 2006

You rang ?

Thermopyle posted:

2. Can anyone recommend a case that fits the Zero W (or whatever is fast enough for face recog) and the camera? I guess it'd be cool if it had some provision for mounting, but I can jury-rig something...
I've got my eyes set on the official zero case as it's built to house the pi and camera in one slim package, no mounting options but it's just bare smooth plastic.

jokes posted:

I have no idea what I'm doing wrong but I am 100% unable to connect to my PiVPN and it is frustrating the hell out of me. I got PiHole working with next to no problems but for some reason this PiVPN is rejecting all connections or something because I can't get any of my devices to connect.
You've opened up your firewall right? and connecting using a client key?

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Super Slash posted:

I've got my eyes set on the official zero case as it's built to house the pi and camera in one slim package, no mounting options but it's just bare smooth plastic.

I went ahead and ordered this last week after posting here...supposed to be here tomorrow.

The Zero is slower than I'd like, but I'll make do for now.

Suspicious Lump
Mar 11, 2004
I wanna build an incubator that uses the RSP, a temp sensor and a heat lamp. Is it worth spending more on a new RSP3 or would the RSP1/2 do the job?

I guess with RSP3 I can use it for other projects, the added wifi is neat. Speaking of other functions, is it feasible to use the RSP for multiple things simultaneously? I'm assuming because it's got a decent linux based OS, I can happily run a few different scripts that are collecting and transmitting data without too much issue.

TheresaJayne
Jul 1, 2011

Drone posted:

Probably the wrong thread for this, but I didn't see a more general microcomputing thread anywhere.

Is there a microcomputer in the same class as a Raspberry Pi that is built specifically with Windows architecture in mind? The background is that I kinda want to stick this WS4000 simulator onto a Pi-sized device and plug it into my TV for a my own private retro-authentic Weather Channel.

Otherwise I'll have to wait until the developer releases v4, which apparently has compatibility with debian-based Linux, so I assume it would run OK in Raspbian.

There is however this channel
The Cavern of COBOL › 64K is still quite a lot! Embedded Programming Microthread

https://forums.somethingawful.com/showthread.php?threadid=3500975

Sad Panda
Sep 22, 2004

I'm a Sad Panda.
A question, quite possibly stupid. I'm using Terminal on my Mac to SSH in.

I SSH in, authenticate as su, and do the following...

root@raspberrypi:/home/pi# reboot

That seems to kill the SSH connection (unsurprisingly) but then no matter how long I wait, I can not SSH in again, it just times out. To me, that suggests that it isn't rebooting properly. If I unplug it and plug it in again then I can SSH in as normal. Am I fundamentally failing to understand how Pis reboot? I'm coming from a Windows background so have no *nix experience.

Sagebrush
Feb 26, 2012

try

> sudo reboot now:ins:

ElCondemn
Aug 7, 2005


Sad Panda posted:

A question, quite possibly stupid. I'm using Terminal on my Mac to SSH in.

I SSH in, authenticate as su, and do the following...

root@raspberrypi:/home/pi# reboot

That seems to kill the SSH connection (unsurprisingly) but then no matter how long I wait, I can not SSH in again, it just times out. To me, that suggests that it isn't rebooting properly. If I unplug it and plug it in again then I can SSH in as normal. Am I fundamentally failing to understand how Pis reboot? I'm coming from a Windows background so have no *nix experience.

Hook a display up to it and see what the screen is saying

eightysixed
Sep 23, 2004

I always tell the truth. Even when I lie.
code:
sudo shutdown -r now
:v:

Sad Panda
Sep 22, 2004

I'm a Sad Panda.

ElCondemn posted:

Hook a display up to it and see what the screen is saying

I restored to a previous Pi image and am trying again. Updating now following https://learn.pimoroni.com/tutorial/raspberry-pi/keeping-your-raspberry-pi-updated instructions. I was SSHd in last night and then it gave up mid SSH and wouldn't reconnect. Plugged it in the TV this afternoon and when I booted into startx I had to type the wifi password in again. Now it's updating again and I'm hoping that when it's done the SSH will work again.

Sad Panda
Sep 22, 2004

I'm a Sad Panda.
I ended up wiping the Pi and using PiVPN to set OpenVPN up and then PiHole to get rid of ads when I'm connected to my VPN. My next 2 stupid questions...

1. When I reboot the pi, it turns on and usually displays the pi@raspberrypi:~$ message, but not always. If it doesn't I can simply press enter and it appears. Any idea on how to resolve that?

2. I've set up RealVNC so I can Cloud VNC in. That works fine, if I tell the Pi to boot to the desktop, but if it boots to CLI instead then it connects but the screen is blank and it doesn't show me the command line. Any ideas to resolve that?

barkbell
Apr 14, 2006

woof
I would like to create a dawn simulator/wake up light alarm clock since the ones by Philips suck. I found a few youtube vids of people doing something similar with source code linked. I have never messed with any RPs before and am a complete noob. What are the best resources available to learn to do my first build as well as parts sellers etc? I think Python is the go-to language for programming a Pi?

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

Not to discourage you from experimenting, but have you tried a phone app that can control smart lights for the alarm? I use 'Sleep as Android' for that. Anyway, you can run any kind of program you want on the Pi, but Python is fairly easy to get into as a beginner.

What kinds of lights do you want to control? Bare LEDs? Standard A19 type light bulbs?

barkbell
Apr 14, 2006

woof
Aren't smart lights wifi? I really don't want to crowd my wifi network anymore than it is. If they are bluetooth are they reliable? Bluetooth would unpair for me in the past randomly. Since I'd use it as an alarm I need something very reliable.

I would want some light that would create a bright enough light to wake me up, 300 lux let's say, and can dim.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

KyloWinter posted:

Aren't smart lights wifi? I really don't want to crowd my wifi network anymore than it is. If they are bluetooth are they reliable? Bluetooth would unpair for me in the past randomly. Since I'd use it as an alarm I need something very reliable.

I would want some light that would create a bright enough light to wake me up, 300 lux let's say, and can dim.

Some are wifi, some are bluetooth, some are zigbee, some are z-wave, some are proprietary protocols.

Sagebrush
Feb 26, 2012

KyloWinter posted:

Aren't smart lights wifi? I really don't want to crowd my wifi network anymore than it is. If they are bluetooth are they reliable? Bluetooth would unpair for me in the past randomly. Since I'd use it as an alarm I need something very reliable.

I would want some light that would create a bright enough light to wake me up, 300 lux let's say, and can dim.

Smart lightbulbs aren't going to "crowd your wifi network." It's not like you're streaming hundreds of gigabytes of photons to make them work. A more realistic concern is that you might buy one with a baked-in root password that's already been cracked, and your lightbulbs end up DDOSing some government server.

Anyway, you're going to want your RPi to be network-connected too, and the total cost of all the parts required to hook the RPi into wall power and dim a powerful LED bulb is going to be way above just buying a wifi lightbulb in the first place. If you want to do it as an experiment, go for it, but most of the value will be in the learning experience.

barkbell
Apr 14, 2006

woof
So you suggest for the light using a smart lightbulb. How about for a speaker?

taqueso
Mar 8, 2004


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

:pirate::hf::tinfoil:

If I was going to use a RPi, I would probably control LEDs with some kind of LED dimmer board instead of a smart bulb, but you could do it either way. One way will involve more electronics (connecting the LEDs and controller), one will involve more software (commanding the smart bulbs to do things).

For a speaker, I would use normal powered speakers (computer speakers or studio monitor type) connected to the headphone jack.

Hadlock
Nov 9, 2004

KyloWinter posted:

I would like to create a dawn simulator/wake up light alarm clock since the ones by Philips suck. I found a few youtube vids of people doing something similar with source code linked. I have never messed with any RPs before and am a complete noob. What are the best resources available to learn to do my first build as well as parts sellers etc? I think Python is the go-to language for programming a Pi?

Get set of neopixels

https://www.adafruit.com/product/1487

Find some code (probably in python, preferably 3.6+) that will run each pixel at the same color, then decide you start and end colors, run a for loop with a delay inside

Then run the python script from a cron job to execute at X time

This assumes you live on the equator where the sun rises at the same time every day

Your neopixel will likely require a dedicated 5v power supply, 5 amps, LEDs suck more juice than the pi can provide

mod sassinator
Dec 13, 2006
I came here to Kick Ass and Chew Bubblegum,
and I'm All out of Ass
I'd look at LiFX bulbs, they use wifi and are easy to control from a tool like homeassistant.io: https://home-assistant.io/

Raw neopixel strips are a bit of a pain to drive from the Pi. They need a very specific signal to be generated and the Pi's linux kernel isn't good at doing that kind of high speed signal generation. There's a python library out there that works but can be fiddly to use. In addition neopixels (WS2812 LEDs) want a 5v signal whereas the Pi GPIO is all 3.3v. It sometimes works and it sometimes doesn't work to just hook them up. When it doesn't work you need to do tricks like run the pixels at a lower power voltage, but then you need to deal with power diodes or level converters and other more complicated things. Bottom line, for a beginner stay away from neopixels driven by the Pi. If you must, look at Dotstar LEDs as they use a SPI connection and can be driven by the Pi without any trouble (though they still have the 5v and 3.3v problems sometimes).

All that said, just grab some smart bulbs that home assistant supports. I have a feeling you can do all of this (scheduling the lights to start at dawn) all from home assistant's GUI too--no coding needed.

barkbell
Apr 14, 2006

woof

Hadlock posted:

Get set of neopixels

https://www.adafruit.com/product/1487

Find some code (probably in python, preferably 3.6+) that will run each pixel at the same color, then decide you start and end colors, run a for loop with a delay inside

Then run the python script from a cron job to execute at X time

This assumes you live on the equator where the sun rises at the same time every day

Your neopixel will likely require a dedicated 5v power supply, 5 amps, LEDs suck more juice than the pi can provide

The sun doesn't need to rise at the same time every day. But I do.

Thanks for the suggestions, I'll look into them. I guess I should be more specific about what I'm trying to accomplish. I would like a device to go from dark to light over a time period of 30 minutes or more and play a sound that gradually gets louder at the same time every morning. I would also like a screen telling me the time. If a clock + smart bulb + some speaker hooked up to my iphone with some sound playing program is the way to go I'm fine with that. It'd just be nice to have it as an all-in-one device. The reason I'm not looking at current dawn simulators/wake up lights on the market is because I've had 2 and they seem to go bad after a year which really isn't good because I'd rather show up to work on time.

Also I don't mind learning new things. I have some basic familiarity with soldering, putting computer parts together, and coding.

barkbell fucked around with this message at 22:17 on Nov 30, 2017

Sagebrush
Feb 26, 2012

I think the primary difficulty is getting the brightness you require. Any simple little electronic controller (Raspberry Pi, Arduino, etc) can do the timing, but won't have the current capacity to drive a "get out of bed" lamp.

If you have to play a sound at the same time, and it needs to also be some long recording that gradually increases in volume, then yeah a Raspberry Pi is probably the easiest way. You can just load the file onto the board and play it through the audio jack, no extra hardware required (other than speakers). But as noted above, hooking a powerful LED into the RPi is a little challenging. Maybe a combination of the RPi, a wifi dongle, a smart light bulb, some speakers, and a script to hook it all together? Make sure that whatever bulb you get has some driver code on github so you don't have to write the protocol yourself. That's probably simpler than trying to run and dim enough neopixels to wake you up.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five
Aren't there IoT bulbs that are also bluetooth speakers?

Hadlock
Nov 9, 2004

mod sassinator posted:

I'd look at LiFX bulbs, they use wifi and are easy to control from a tool like homeassistant.io: https://home-assistant.io/

Raw neopixel strips are a bit of a pain to drive from the Pi. They need a very specific signal to be generated and the Pi's linux kernel isn't good at doing that kind of high speed signal generation. There's a python library out there that works but can be fiddly to use. In addition neopixels (WS2812 LEDs) want a 5v signal whereas the Pi GPIO is all 3.3v. It sometimes works and it sometimes doesn't work to just hook them up. When it doesn't work you need to do tricks like run the pixels at a lower power voltage, but then you need to deal with power diodes or level converters and other more complicated things. Bottom line, for a beginner stay away from neopixels driven by the Pi. If you must, look at Dotstar LEDs as they use a SPI connection and can be driven by the Pi without any trouble (though they still have the 5v and 3.3v problems sometimes).

All that said, just grab some smart bulbs that home assistant supports. I have a feeling you can do all of this (scheduling the lights to start at dawn) all from home assistant's GUI too--no coding needed.

Have you done anything with PWM on the pi? It's been probably 2 years for me but I've had no problem running 8 servos in one project, two in another, plus countless experiments with neopixels on a raspberry pi model A. The python libraries tie in to the RAM clock to give super precise timing independent of cpu and kernel load.

Maybe the library has... degraded? Since then, but PWM for 2 receivers has not at all been a problem for me to date.

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

Hadlock posted:

Have you done anything with PWM on the pi? It's been probably 2 years for me but I've had no problem running 8 servos in one project, two in another, plus countless experiments with neopixels on a raspberry pi model A. The python libraries tie in to the RAM clock to give super precise timing independent of cpu and kernel load.

Maybe the library has... degraded? Since then, but PWM for 2 receivers has not at all been a problem for me to date.

You can't drive NeoPixels with a PWM signal unfortunately, they need a different pulse length for ones vs. zeros. If you're curious check this out for a good description of the the signal: https://learn.adafruit.com/adafruit-neopixel-uberguide/advanced-coding#writing-your-own-library The trickiness in generating that signal in software is that you need somewhat precise 0.4 to 0.8 microsecond timing, but when the kernel interrupts your code all bets are off and microsecond accuracy goes out the window. Perhaps you could make it work PWM work with DMA to the PWM hardware that adjusts the duty cycle to mimic the changing pulse widths, but you'd probably need to make a kernel module to get that low level of access.

wolrah
May 8, 2006
what?
This library does pretty much exactly that as far as I'm aware: https://github.com/jgarff/rpi_ws281x

You still have the level conversion to deal with but that's the same as APA102s, you can sometimes get away without it.

huhu
Feb 24, 2006

Sagebrush posted:

lightbulbs end up DDOSing some government server.

Got any news stories of this actually happening? My first thought was, what a stupid world we live in. Like the "I can't read right now because my Kindle's dead and I'm charging my cigarette."

astral
Apr 26, 2004

huhu posted:

Got any news stories of this actually happening? My first thought was, what a stupid world we live in. Like the "I can't read right now because my Kindle's dead and I'm charging my cigarette."

Mirai, though I don't remember offhand if light bulbs specifically were a part of it.

tater_salad
Sep 15, 2007


https://www.pcworld.com/article/3134056/hacking/an-iot-botnet-is-partly-behind-fridays-massive-ddos-attack.html

cheap chinese items (DVR and Security / Wifi Cameras) with the default login not changed which was probably "admin/pasword"

Framboise
Sep 21, 2014

To make yourself feel better, you make it so you'll never give in to your forevers and live for always.


Lipstick Apathy
I bought a Raspberry Pi four years ago or so (the version escapes me), and I'm wanting to dabble with it again. Unfortunately, it stopped working that same year for reasons I'm not quite sure of and since there's newer versions out now, I'm better off starting fresh. I just have a couple questions that lurking backward a few pages didn't really answer for me.

Which version is the best one to get if I'm going to be using it primarily as a RetroPie/Kodi device for my TV (as well as just because I want to re-learn how to use Linux too), and how much has RetroPie improved over the years? I remember playing through Chrono Trigger on that old one 4 years back and while it sufficed for most of the game, there were some parts it really lagged on. I've also heard some talk that it can handle PSX/N64/NDS pretty well now, but I wondered how true that was.

Sagebrush
Feb 26, 2012

Get the newest and fastest one, which is the Pi 3 model B.

Adbot
ADBOT LOVES YOU

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five
If you want to use it for RetroPie, a case with a fan (and CPU and GPU heatsinks) is highly advisable.

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