This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import libraries | |
import time | |
import os | |
while True: # do forever | |
os.system('fswebcam -r 320x240 -S 3 --jpeg 50 --save /home/pi/to_transmit/%H%M%S.jpg') # uses Fswebcam to take picture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import os.path | |
import serial | |
def process_image(): | |
best_file = "" | |
biggest_size = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<daveake> Our postman has a second job as an electrical system tester | |
[10:00] <daveake> (you can do your own punchline) | |
[10:00] <daveake> perhaps you can't ... :p | |
[10:01] <ibanezmatt13> I'm sorry, I don't have a punchline :) | |
[10:01] <daveake> postman PAT | |
[10:01] <fsphil> oh dear | |
[10:01] <ibanezmatt13> oh god | |
[10:01] <ibanezmatt13> :) | |
[10:01] <daveake> worth the wait, no? | |
[10:01] <HixWork> too early for that lark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[16:23] <daveake> I shall explain how it works ... | |
[16:24] <ibanezmatt13_> thanks | |
[16:24] <daveake> ... by getting you to figure it out :-) | |
[16:24] <ibanezmatt13_> sure :) | |
[16:24] <daveake> So, the CPU pin (Tx on the Pi) is set to low or high | |
[16:25] <daveake> low is 0V so that's GND, and high is 3.3V so that's Vcc | |
[16:25] <ibanezmatt13_> ok, i'm with you so far | |
[16:25] <daveake> Good | |
[16:25] <daveake> So that goes through a resistor let's say it's 30k | |
[16:25] <ibanezmatt13_> yep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import required libraries | |
import serial | |
import crcmod | |
import os | |
import os.path | |
import time | |
GPS = serial.Serial('/dev/ttyAMA0', 9600) # open serial to write to GPS | |
# Disabling all NMEA sentences except $GPGGA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# import required libraries | |
import serial | |
import crcmod | |
import time | |
import time as time_ | |
gps_set_sucess = False # boolean for the status of flightmode | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import required libraries | |
import serial | |
import crcmod | |
import os | |
import os.path | |
import time | |
def disable_sentences(): | |
GPS = serial.Serial('/dev/ttyAMA0', 9600, timeout=1) # open serial to write to GPS | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[10:11] <ibanezmatt13> I mean it's working perfectly with it in, but I just wanted to know if it would harm the ublox | |
[10:14] <daveake> no not at all | |
[10:15] <ibanezmatt13> excellent. My program is now utterly bombproog | |
[10:15] <ibanezmatt13> bombproof :) | |
[10:15] == marcosscriven [[email protected]] has quit [Remote host closed the connection] | |
[10:15] <ibanezmatt13> I've reset the GPS while it's been running, taken out the TX line, the RX line, everything. And it still works :) | |
[10:15] <daveake> A bold statement; you'll soon learn not to make those :) | |
[10:16] <daveake> Seriously though well done | |
[10:17] <Upu> lol | |
[10:17] <ibanezmatt13> thanks :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!/bin/sh -e # i commented this out | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while [ 1 ]; do # forever | |
{ | |
/home/pi/MATT-1.py; | |
SLEEP(5) | |
} | |
done |
OlderNewer