Skip to content

Instantly share code, notes, and snippets.

View mik30s's full-sized avatar
😐
500 lines of template errors

Michael mik30s

😐
500 lines of template errors
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include "ros/ros.h"
#include "std_msgs/MultiArrayLayout.h"
#include "std_msgs/MultiArrayDimension.h"
#include "std_msgs/Int32MultiArray.h"

Second Arm

Part # Servo id Home/Center min max Decreasing direction
Base 1 1750 1000 4095 in to out
Shoulder 2 2250 1500 3000 left to right
Elbow 3 2850 900 3500 down up
Wrist 4 2000 1000 3000 in out

First Arm

#include <SCServo.h>
SMSCL sm;
SMSCL smB;
long int wait = 5000;
int center = 4095/2;
int speed = 250;
char data[5];
int start = 0;
@mik30s
mik30s / arduino_serial.c
Created May 22, 2018 00:08
Serial Communication with C++
/*
* Arduino-serial
* --------------
*
* A simple command-line example program showing how a computer can
* communicate with an Arduino board. Works on any POSIX system (Mac/Unix/PC)
*
*
* Compile with something like:
* gcc -o arduino-serial arduino-serial.c
@mik30s
mik30s / 2rr_foward_kinematics.ipynb
Last active May 20, 2018 01:37
Foward kinematics of a RR planar manipulator
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mik30s
mik30s / knn.js.html
Last active June 8, 2018 02:13
K Nearest Neighbors in Javascript
<div id="knn-react-app" class="embedded-app" style="text-align: center;">
<button id="knn-1-predict-btn"> <i class=""></i> Predict</button>
<input type="checkbox" id="knn-1-scale-btn" />
<label for="subscribeNews">Scale?</label>
<input id="knn-1-kvalue" placeholder="# of neighbours eg. 3"/>
<input id="knn-1-point-input" placeholder="weight,color,seeds eg. 371,3,1" />
<i class="fas fa-equals"></i>
<img width="25" height="25" id="knn-1-class-img" />
</div>
<div id="knn-vis1" style="width: 100%; height: 520px;"></div>
@mik30s
mik30s / log_manager.hpp
Last active July 10, 2019 02:28
A simple and hacky logger using fmtlib in C++17
#pragma once
#include <variant>
// use fmtlib as the backbone for printing and formating messages.
#include <fmt/fmt.h>
// Colors from @gon1332
// https://github.com/gon1332/fort320
/* FOREGROUND */
#define RST "\x1B[0m"
@mik30s
mik30s / trajectory_fixed.ipynb
Created December 23, 2017 02:00
Generating Trajectories in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mik30s
mik30s / trajectory.ipynb
Created December 22, 2017 05:06
Generating Trajectories with Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mik30s
mik30s / EditorMenu.java
Created October 23, 2017 02:15
Lab14 GUI
package edu.tarleton;
import java.util.HashMap;
import java.util.Iterator;
import java.util.function.Consumer;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;