User Tools

Site Tools


surv_camera

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
surv_camera [2024/02/27 09:43] – [Configuration] memeruizsurv_camera [2024/04/09 23:14] memeruiz
Line 142: Line 142:
   ln -s camera1 /var/www/nextcloud/data/motioneye/files/camera1   ln -s camera1 /var/www/nextcloud/data/motioneye/files/camera1
   chown -R www-data:www-data camera1   chown -R www-data:www-data camera1
 +
 +=== UART + Wanderer ===
 +
 +In motioneyeOS things are a bit different:
 +
 +For activating the UART raspberry pi zero w port:
 +
 +Edit /boot/config.txt
 +
 +Add this:
 +
 +  dtoverlay = miniuart-bt
 +
 +/dev/ttyAMA0 existed before but it doesn't work by default. After activiting miniuart-bt it starts working
 +
 +Test with a loopback cable between tx and rx and with this test program:
 +
 +
 +  import serial
 +  test_string = "Test serial port ...".encode('utf-8')
 +  port_list = ["/dev/ttyAMA0","/dev/ttyAMA0","/dev/ttyS0","/dev/ttyS"]
 +  for port in port_list:
 +    try:
 +      serialPort = serial.Serial(port, 9600, timeout = 2)
 +      print ("Serial port", port, " ready for test :")
 +      bytes_sent = serialPort.write(test_string)
 +      print ("Sended", bytes_sent, "byte")
 +      loopback = serialPort.read(bytes_sent)
 +      if loopback == test_string:
 +        print ("Received ",len(loopback), "bytes. Port", port,"is OK ! \n")
 +      else:
 +        print ("Received incorrect data:", loopback, "on serial part", port, "loopback \n")
 +      serialPort.close()
 +    except IOError:
 +      print ("Error on", port,"\n")
  
  
surv_camera.txt · Last modified: 2024/04/09 23:31 by memeruiz