Pierre Bourdin 1 ano atrás
pai
commit
ccf0b2e0ba
3 arquivos alterados com 36 adições e 0 exclusões
  1. 7 0
      1_capture.sh
  2. 6 0
      2_convert.sh
  3. 23 0
      3_transmit.sh

+ 7 - 0
1_capture.sh

@@ -0,0 +1,7 @@
+#!/bin/bash
+
+DATE=$(date +%y%m%d_%H%M%S)
+sudo raspistill -o /ramfs/$DATE.jpg
+echo "Picz $DATE.jpg saved in RAM"
+cp /ramfs/$DATE.jpg ~/_Pictures
+echo "Picz $DATE.jpg saved to SDCARD"

+ 6 - 0
2_convert.sh

@@ -0,0 +1,6 @@
+#!/bin/bash
+
+cd /ramfs
+FILE=$(find ./ -type f -name *.jpg)
+convert $FILE -resize 640x480^ lit-$FILE
+

+ 23 - 0
3_transmit.sh

@@ -0,0 +1,23 @@
+#!/bin/bash
+
+
+trap ctrl_c INT
+
+function ctrl_c() {
+	echo "Ctrl + C happened"
+	raspi-gpio set 4 dh
+}
+
+
+# Setup the GPIO4 as output for Tx
+raspi-gpio set 4 op && raspi-gpio set 4 dh
+raspi-gpio set 4 dl
+sleep 1
+
+IMG=$(cd /ramfs; find ./ -type f -name *.jpg -exec readlink -f {} \;)
+
+
+cd ~/trxamadrmv3_7/linux/
+./drm $IMG
+
+raspi-gpio set 4 dh