Night Vision for Airsoft with picatiny rail

Night Vision for Airsoft with picatiny rail

thingiverse

All parts are printed in PLA without support on an Ender 3 S1 Pro.Camera case based on :https://www.thingiverse.com/thing:465678Raspberry pi and + LCD screen case based on :https://www.thingiverse.com/thing:2755112Material : Kuman TFT tactile LCD screen 3.5'' with HDMIRaspberry pi 2 or 3IR flashlight: https://www.amazon.fr/dp/B0BKT3FWR8?psc=1&ref=ppx_yo2ov_dt_b_product_detailsIR camera for Raspberry Pi : https://www.amazon.fr/dp/B0919M7728?psc=1&ref=ppx_yo2ov_dt_b_product_detailsProgram :Raspberry pi OS (Legacy, 32-bit) LiteSilent Boot if needed :sudo nano /boot/cmdline.txtadd : quietScript on boot :1- sudo chmod +x jam.py2- sudo nano /etc/rc.localadd : /usr/bin/python3 /home/'your directory'/jam.py &auto launch log :raspi-configselect option you needMake text bigger :sudo nano /etc/default/console-setupFONTFACE="Terminus"FONTSIZE="16x32"Program python : jam.py# _*_ coding: utf-8 _*_import osimport RPi.GPIO as GPIOimport timefrom time import sleepfrom picamera import PiCameraimport datetime as dt#Choix du GPIO sur lequel est connecté le boutonbutton = 21stop = 13etat = 'off'txt = 40 # 6 to 160cb = 50cc = 0cs = 2cr = 90cf = 24ccu = 128ccv = 0h = 0m = 0GPIO.setmode(GPIO.BCM)GPIO.setup(button, GPIO.IN, pull_up_down = GPIO.PUD_UP)GPIO.setup(stop, GPIO.IN, pull_up_down = GPIO.PUD_UP)start = dt.datetime.now()#print (start)while True: # Affichage de l'heure : #time = dt.datetime.now().strftime('%H:%M:%S %d/%m/%Y') # Affichage de la durée de fonctionnement #delta = (dt.datetime.now() - start).seconds #time = dt.datetime.utcfromtimestamp(delta) #time = time.strftime('%H:%M:%S') if etat == 'night': camera.annotate_text_size = txt camera.annotate_text = 'NIGHT MODE' #+ " : " + time elif etat == 'day' : camera.annotate_text_size = txt camera.annotate_text = 'DAY MODE' #+ " : " + time if GPIO.input(button) == GPIO.LOW and etat == 'off': camera = PiCamera() etat = 'night' #camera.brightness = cb #camera.contrast = cc #camera.saturation = cs camera.framerate = cf camera.rotation = cr camera.color_effects = (ccu, ccv) camera.start_preview() sleep(0.2) elif GPIO.input(button) == GPIO.LOW and etat == 'night': camera.stop_preview() etat = 'day' camera.framerate = cf camera.rotation = cr camera.color_effects = None camera.start_preview() sleep(0.2) elif GPIO.input(button) == GPIO.LOW and etat == 'day': etat = 'off' camera.stop_preview() camera.close() duree = (dt.datetime.now() - start).seconds duree = dt.datetime.utcfromtimestamp(duree) duree = duree.strftime('%H:%M:%S') print ('Durée de fonctionnement : ' + duree) sleep(0.2) start_time = time.time() if GPIO.input(stop) == GPIO.LOW: start_time = time.time() while GPIO.input(stop) == GPIO.LOW: pass duration = time.time() - start_time if duration >= 2: os.system('shutdown now -h') elif duration < 2: if etat == 'off': string_cr = str(cr) print ("Camera rotation set to : " + string_cr + "°") elif cr > 180: cr = 0 camera.rotation = cr camera.stop_preview() camera.start_preview() else: cr = cr + 90 camera.rotation = cr camera.stop_preview() camera.start_preview() sleep(0.2)

Download Model from thingiverse

With this file you will be able to print Night Vision for Airsoft with picatiny rail with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Night Vision for Airsoft with picatiny rail.