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
ArcticZombie
Sep 15, 2010
I'm trying to cook up some sort of alarm system for my garage, which has no power (and is infeasible to run power to). I was thinking of some sort of light beam or maybe magnetic sensor on the door, hooked up to a Raspberry Pi which also controls a siren of some kind. The reason I'm looking at a Pi for this is because of the ease of using a usb wifi/bluetooth dongle to connect to the Pi to enable/disable the alarm.

The only experience I've had with electronics was some soldering to install a new PCB in an arcade stick, so I'm really out of my depth here. I do have experience writing software though.

The first problem is power, how feasible is a battery powered Model A+? Could I run the Pi, the sensor and the wifi/bluetooth dongle off of rechargable batteries for at least say, 10 hours?

Second problem is the siren, and it's related to the first I guess. The sort of sirens I'm after are 12v, the Pi takes 5v. With my lack of knowledge I don't know how I can run these off of a single power source. The siren itself won't need to run for long.

Lastly, is the Pi even the best option for this? Would an Arduino with bluetooth or wifi be more suited?

I didn't see any general electronics thread in the first 5 pages so I hope I'm in the right place.

Adbot
ADBOT LOVES YOU

ArcticZombie
Sep 15, 2010
Thanks, I'll go with the Arduino. Seems like the simpler solution. GSM functionality looks like a fun thing to add too.

ArcticZombie
Sep 15, 2010
I've never found it too tricky to get a Pi setup entirely headless using Wi-fi, just add an empty ssh file and a minimal wpa_supplicant.conf file to the boot partition and you're away:

code:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=COUNTRY_CODE

network={
    ssid="SSID"
    psk="PASSWORD"
}

ArcticZombie
Sep 15, 2010
I want to use Clang/LLVM to cross compile for the Raspberry Pi Zero W and no matter what I do, the binaries I produce wind up with illegal instructions. I'm using Clang 9 on Ubuntu and building with options like:
code:
clang --target=arm-linux-gnueabihf -mcpu=arm1176jzf-s \
      --sysroot=$SYSROOT -isystem $SYSROOT/usr/include/arm-linux-gnueabihf \
      -fuse-ld=lld ... 
and the binaries I produce end up with VLDR instructions, which aren't legal on the arm1176jzf-s.

I've tried to stop the generation of these instructions, passing arguments through to llc: -mllvm -mattr=-vfp2, VFP2 being the set of instructions which VLDR belongs to. Still, they are generated. How do you lot cross compile stuff for Raspberry Pi Zeros? I've no problem producing binaries for later Pis with the Cortex CPUs using this method.

ArcticZombie fucked around with this message at 21:03 on Mar 30, 2020

ArcticZombie
Sep 15, 2010
Didn't work, but apparently this is a problem with the Clang/LLVM on Ubuntu 18.04 (it is running as a VM using multipass, not sure if it works native), because doing it straight up on my Mac produces binaries which work just fine.

ArcticZombie
Sep 15, 2010
Another alternative, and the only one I’ve been satisfied with in a multi room setup, is running forked-daapd in conjunction with shairport-sync. I run forked-daapd on my NAS (a Pi4) and shairport-sync on Pi0Ws attached to dumb speakers. Forked-daap can also do local output, before I got the Pi4 it ran on a Pi3A directly attached to some dumb speakers.

Adbot
ADBOT LOVES YOU

ArcticZombie
Sep 15, 2010

ante posted:

Does anyone actually... Like Raspberry Pis?


This might be the wrong thread to ask in, but just kinda been disappointed in them for years, continually going back and trying again to see if I'm still disappointed

I have a couple Zero Ws and a 3A with amplifier boards that I use to turn dumb passive speakers into a multi-room AirPlay setup, and a 4B as a mini NAS + a few services such as a media server and DNS-based ad-blocking. Installing a desktop OS on them is a mistake.

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