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 pygame | |
import sys | |
pygame.init() # Loads pygame engine | |
pygame.joystick.init() # main joystick device system | |
try: | |
j = pygame.joystick.Joystick(0) # create a joystick instance | |
j.init() # init instance | |
print ("Enabled joystick: {0}".format(j.get_name())) |
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 pygame,sys,glob | |
pygame.init() | |
#from pygame import * | |
try: | |
j = pygame.joystick.Joystick(0) # create a joystick instance | |
j.init() # init instance | |
print ("Enabled joystick: {0} with {1} buttons".format( j.get_name(),j.get_numbuttons())) |
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 pygame | |
from pygame.locals import * | |
from OpenGL.GL import * | |
from OpenGL.GLU import * | |
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
Basic Perfect Makefile for compiling target .cpp files with SDL2 libraries using g++. | |
#USEAGE: copy Makefile to folder with .cpp files then type "make" | |
#OBJS specifies which files to compile as part of the project | |
OBJS = $(wildcard *.cpp) | |
#CC specifies which compiler we're using | |
CC = g++ |
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
/* | |
Morse Code Project | |
This code will loop through a string of characters and convert these to morse code. But first you have to get the password to start the morse code seation. | |
It will blink two LED lights and play audio on a speaker. | |
https://www.instructables.com/id/Arduino-Morse-Code/ | |
*/ | |
//**************************************************// |
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
// the setup function runs once when you press reset or power the board | |
int led6 = 6; | |
int buzzer = 7; | |
int val = 0; //value for storing moisture value | |
int soilPin = A4;//Declare a variable for the soil moisture sensor | |
int soilPower = 2;//Variable for Soil moisture Power |
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/expect -f | |
#set multiPrompt {[#>$] } | |
#exp_internal 1 | |
set NODE [lindex $argv 0]; | |
set IPz [lindex $argv 1]; | |
set Portz [lindex $argv 2]; | |
set Passwdz [lindex $argv 3]; | |
#log_file -noappend output.log | |
set timeout 1 | |
set force_conservative 0 ;# set to 1 to force conservative mode even if |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpotlightController : MonoBehaviour { | |
private Vector3 targetPos; | |
public float moveSpeed = 10f; | |
public GameObject followTarget; | |
public float Xoffset = 0f; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FlickeringLightScript : MonoBehaviour { | |
Light testLight; | |
public float minFlickerTime = 0.1f; | |
public float maxFlickerTime = 0.04f; |
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 rtlsdr | |
import pygame | |
import time | |
# Create an instance of the RtlSdr class | |
sdr = rtlsdr.RtlSdr() | |
# Set the center frequency of the RTL-SDR device (in Hz) | |
sdr.center_freq = 101.1e6 |
OlderNewer