Have you confirmed the sensor itself is actually working?
Write out the following python script and run it:
import gpizero import MotionSensor
pir = MotionSensor(x) //x = the out pin on your Pi.
while True:
if pir.motion_detected:
print("Motion detected!")
else:
print("Nothing")
And make sure you’re using the BCM pin numbering.
@cowboysdude
I think I got lucky with it actually being the micro-SD card. I’ve been using a SD card adapter to fit into the SD slot in my computer, and unfortunately there’s only one of those on my laptop :P
For some reason, when I had the old card, formatting it (even when it was completely empty and fresh out of the box) took at least half an hour. Now with the new one it only took about 5 minutes.
@Iron_Reptar Just for fun I decided to try to rerun the command again, and it first said that “dpkg was interrupted.” so I ran
sudo dpkg --configure -a
Like the screen told me to, then re-re-ran it, to arrive at the error "E: Sub-process /usr/bin/dpkg returned an error code (1).
Help, all I want is a working mirror :(