Skip to content

Instantly share code, notes, and snippets.

View MarcScott's full-sized avatar

Marc Scott MarcScott

View GitHub Profile
@MarcScott
MarcScott / ball_controller.cs
Created March 13, 2023 09:28
Ball Controller
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BallController : MonoBehaviour
{
private Rigidbody rb;
public Transform cameraTransform;
@MarcScott
MarcScott / birdcam.py
Created May 25, 2021 08:07
pir activated birdbox camera
from gpiozero import MotionSensor
from picamera import PiCamera
from signal import pause
from datetime import datetime
from time import sleep
pir = MotionSensor(14)
cam = PiCamera()
cam.resolution = (1920, 1080)
cam.rotation = 90
@MarcScott
MarcScott / game-starter.py
Created May 12, 2021 17:10
Surrogate.tv buggy starter
import logging
from gpiozero import Robot
from time import sleep
from surrortg import Game
from surrortg.inputs import Joystick
#robot = Robot(left=(19, 26), right=(6, 13))
class MyJoystick(Joystick):
import logging
from gpiozero import Robot
from time import sleep
from surrortg import Game
from surrortg.inputs import Joystick
#robot = Robot(left=(19, 26), right=(6, 13))
class MyJoystick(Joystick):
@MarcScott
MarcScott / pico_buggy.py
Created April 28, 2021 17:26
Forward, backward pico buggy
from machine import Pin
import utime
motor_left_FORWARD=Pin(7, Pin.OUT)
motor_left_BACKWARD=Pin(8, Pin.OUT)
motor_right_FORWARD=Pin(9, Pin.OUT)
motor_right_BACKWARD=Pin(10, Pin.OUT)
motor_left_FORWARD.value(1)
motor_right_FORWARD.value(1)
@MarcScott
MarcScott / game.py
Last active April 27, 2021 12:40
surrogate.tv buggy
import logging
from gpiozero import Robot
from time import sleep
from surrortg import Game
from surrortg.inputs import Switch
from surrortg.inputs import Joystick
robot = Robot((7,8), (9,10))
class MyJoystick(Joystick):
@MarcScott
MarcScott / passwords.txt
Created April 21, 2021 17:56
passwords
This file has been truncated, but you can view the full file.
!!!!!
!!!!!!
!!!!!!!
!!VMwar33
!!zasada
!12345
!1QmS?
!23456
!2h7=aol64#Exq0Q
@MarcScott
MarcScott / passwords.txt
Last active April 21, 2021 17:53
sanitised_passwords
This file has been truncated, but you can view the full file.
!!!!!
!!!!!!
!!!!!!!
!!VMwar33
!!zasada
!12345
!1QmS?
!23456
!2h7=aol64#Exq0Q
!4PolskaViza$
@MarcScott
MarcScott / parking_sensor.py
Last active March 5, 2021 18:50
Pico Parking Sensor
from machine import Pin
from utime import sleep_us, ticks_us, sleep
trig=Pin(17, Pin.OUT)
echo=Pin(16, Pin.IN)
buzzer=Pin(27, Pin.OUT)
buzzer.value(1)
sleep(0.5)
buzzer.value(0)
from machine import Pin, PWM
from math import floor
from utime import sleep, sleep_us, ticks_us
trig=Pin(17, Pin.OUT)
echo=Pin(16, Pin.IN)
servo = PWM(Pin(18))
servo.freq(50)
duty = 0