Joy-it SBC-PIR User guide

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
INFRARED MOTION SENSOR
SBC-PIR
1. GENERAL INFORMATION
Dear customer, thank you very much for choosing our product. In following, we will introduce you to what to observe while starting up and using this product. Should you encounter any unexpected problems during use, please do not hesitate to contact us.
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
2. USE WITH ARDUINO
Aer connecting the SBC-PIR, as shown above, we will now connect the Arduino to our PC using the included cable. Then we will open our Arduino DIE. If you don't have it yet you can download it here and install it. Aer that we select our Arduino under Tools > Port. Under Tools > Board we select
"Arduino Uno" and under Tools > Programmer we select "ArduinoISP".
Pin assignment
Sensor
Pin assignment
Arduino
Sig Pin 2
VCC Pin +3,3V oder
Pin +5V
GND Pin GND
2.1 CODE EXAMPLE ARDUINO
Aer the above steps we will now simply copy the following code into our IDE.
#define PIR_MOTION_SENSOR 2 //PIN für den PIR-Sensor
int sensorValue;
void setup()
{ // Pininitialisierung pinMode(PIR_MOTION_SENSOR, INPUT); pinMode(LED,OUTPUT); Serial.begin(9600); }
void loop()
{ sensorValue = digitalRead(PIR_MOTION_SENSOR); if(sensorValue == HIGH) { Serial.println("Bewegung erkannt"); delay(1000); } else { Serial.println("Keine Bewegung erkannt"); delay(1000); } }
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
3. USE WITH RASPBERRY PI
Pin assignment Sensor
Pin assignment Raspberry Pi
Sig GPIO 18 [Pin 12]
VCC 3,3V [Pin 1]
or 5V [Pin 2]
GND Ground [Pin 6]
Aer connecting the SBC-PIR, as shown above, we will now connect the Raspberry Pi to a screen as­well as we connect a mouse and keyboard. Aer the setup we will open the console.
3.1 CODE EXAMPLE RASPBERRY PI
Aer the above steps you should see this window in front of you.
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
3.1 CODE EXAMPLE RASPBERRY PI
Aer the above steps we will now create a new file by
import RPi.GPIO as GPIO import time
GPIO.setmode(GPIO.BCM)
#Initialization of the SCB-PIR on PIN 12
PIR = 12 GPIO.setup(PIR, GPIO.IN)
print ("PIR-Sensor aktiv!")
try: # Start of a loop
while True: if(GPIO.input(PIR) == 0): # When Sensor Input = 0 print("Keine Bewegung ...") # When the print command is executed time.sleep(0.5) # wait 0,5 second elif(GPIO.input(PIR) == 1): # When Sensor Input = 1 print("Bewegung Erkannt!") # When the print command is executed time.sleep(0.5) # wait 0,5 second
except KeyboradInterrupt:
GPIO.cleanup()
sudo nano SBC-PIR.py
Aer all this we save and exit the file with CTRL+O ENTER CTRL+X
and copy the following code into the new file opened by going to Edit>Paste
You then execute the code by entering
sudo python3 SBC-PIR.py
You stop the code by using CTRL+C
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
PR
4. ADDITIONAL INFORMATION
Our information and take-back obligations according
to the Electrical and Electronic Equipment Act (ElektroG)
Symbol on electrical and electronic equipment:
This crossed-out dustbin means that electrical and electronic appliances do not belong in the household waste. You must return the old applianc­es to a collection point. Before handing over waste batteries and accumulators that are not en­closed by waste equipment must be separated from it.
Return options:
As an end user, you can return your old device (which essentially fulfils
the same function as the new device purchased from us) free of charge for disposal when you purchase a new device. Small appliances with no external dimensions greater than 25 cm can be disposed of in normal household quantities independently of the pur­chase of a new appliance.
Possibility of return at our company location during opening hours:
SIMAC Electronics GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn, Germa­ny
Possibility of return in your area:
We will send you a parcel stamp with which you can return the device to us free of charge. Please contact us by email at Service@joy-it.net or by telephone.
Information on packaging:
If you do not have suitable packaging material or do not wish to use your
own, please contact us and we will send you suitable packaging.
5. SUPPORT
If there are still any issues pending or problems arising aer your purcha­se, we will support you by e-mail, telephone and with our ticket support system.
Email: service@joy-it.net
Ticket system: http://support.joy-it.net
Telephone: +49 (0)2845 98469-66 (10-17 oclock) For further information please visit our website:
www.joy-it.net
Veröentlicht:
www.joy-it.net
SIMAC Electronics GmbH
Pascalstr. 8, 47506 Neukirchen-Vluyn
Loading...