Skip to content

Instantly share code, notes, and snippets.

View HurricanesFan73's full-sized avatar

HurricanesFan73

View GitHub Profile
@HurricanesFan73
HurricanesFan73 / MatlabHockey.m
Created January 13, 2019 04:39
Matlab Hockey Game Code
function [] = MATLAB_AIR_HOCKEY_PONG()
%close all open figures, clear all variables, and clear command window
close all
clear all
clc
% //////////CONSTANTS\\\\\\\\\\
% gameplay settings
This file has been truncated, but you can view the full file.
%
( HUEY MACHINING )
N10 (**********)
N20
N30 (T2-Nevada)
N40 (T3-Mario)
N50
N60 (**********)
N70
N80 G90 G17 G80 G40
@HurricanesFan73
HurricanesFan73 / RoboticGripperCode.c
Created January 12, 2019 04:00
Code for the Teensy 2.0 that Controlled the Robotic Gripper
/* Name: main.c
* Author: Tristan Peyton
*/
#include "teensy_general.h" // includes the resources included in the teensy_general.h file
#include <avr/io.h> //includes the resources included in the avr/io.h file
#include "t_usb.h" //includes the resources included in the t_usb.h file
#include "ADC.h" //includes the resources included in the ADC.h file
#include <stdlib.h> //includes the resources included in the stdlib.h file
#define F_CPU 16000000UL //redefines CPU operation frequency
@HurricanesFan73
HurricanesFan73 / SendCode.c
Created January 11, 2019 18:21
NodeMCU-ESP32S Code for Board Located in Controller
/* Lab 3.2: Controller Code
* Team: Kien Lin, Alfa Lopez, Tristan Peyton
* Overview:
* Be able to control control based on whether GO! command is received
* Send potentiometer values from servo and dc motor to RC car
*/
//Wifi Initialization
#include <WiFi.h>
#include <WiFiUdp.h>
@HurricanesFan73
HurricanesFan73 / ReceiveCode.c
Created January 11, 2019 16:57
NodeMCU-ESP32S C Code for the Car
//initializing variables for servo
#define SERVO_OUTPUT 33
#define freq_servo 50
#define channel_servo 1
#define resolution_servo 8
//initializing variables for motor
#define Motor_Channel 0
#define Motor_RESOLUTION_BITS 13
#define Motor_RESOLUTION 13
@HurricanesFan73
HurricanesFan73 / SendTest.c
Created January 11, 2019 06:06
Controller NodeMCU-ESP32S C Code
//MEAM 510 LAB 3.1.4 Code --> Tristan Peyton
//Wifi Initialization
#include <WiFi.h>
#include <WiFiUdp.h>
const char* ssid = "TP";
const char* password = "Mechatronics";
@HurricanesFan73
HurricanesFan73 / RobotTest.c
Last active January 11, 2019 06:07
Robot NodeMCU-ESP32S C Code
#include <stdio.h>
#include "esp_log.h"
#include "driver/i2c.h"
#include "sdkconfig.h"
//LED STUFF++++++++++++++++++++++++++++++++++++++++
#include "FastLED.h"
FASTLED_USING_NAMESPACE
#define ROBOTNUM 4 // robot number
@HurricanesFan73
HurricanesFan73 / LightSensingMain.c
Created January 11, 2019 05:24
Light Sensing Code for Teensy 2.0 Written in C
/* Name: main.c
* Author: Tristan Peyton
*/
#include "teensy_general.h"  //includes the resources included in the teensy_general.h file
#include <avr/io.h> //includes the resources included in the avr/io.h file
#include <stdio.h> //inclueds the resources included in the stdio.h file
#include "t_usb.h"  //includes the resources included in the t_usb.h file
#define F_CPU 16000000UL //redefines CPU operation frequency to 16 MHz
// global variables