This file contains hidden or 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
| int xPos = 0; | |
| int yPos = 0; | |
| int xCal; | |
| int yCal; | |
| void setup() | |
| { | |
| Mouse.begin(); | |
| delay(1000); |
This file contains hidden or 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
| # Utilities for quickly accessing frequently used directories in bash. | |
| # Usage: | |
| # $ cd /path/to/project/src/ | |
| # $ mark code # Will create a new shortcut. | |
| # # Becomes interactive if a shortcut already exists | |
| # # m is an alias for mark. You can also `m code` | |
| # | |
| # $ code # From now on, running this anywhere in the shell | |
| # # will put you in /path/to/project/src/code |
This file contains hidden or 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
| #define EN1A 9 | |
| #define M1A 8 | |
| #define EN1B 3 | |
| #define M1B 2 | |
| #define EN2A 4 | |
| #define M2A 5 | |
| #define EN2B 7 | |
| #define M2B 6 | |
| #define C1 A0 |
This file contains hidden or 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
| #include <stdint.h> | |
| #define EN1A 9 | |
| #define M1A 8 | |
| #define EN1B 3 | |
| #define M1B 2 | |
| #define EN2A 4 | |
| #define M2A 5 | |
| #define EN2B 7 |
This file contains hidden or 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
| #include <stdint.h> | |
| #define left_motor_forward() digitalWrite(M1A,HIGH); digitalWrite(M1B,HIGH); | |
| #define left_motor_backward() digitalWrite(M1A,LOW); digitalWrite(M1B,LOW); | |
| #define right_motor_forward() digitalWrite(M2A,LOW); digitalWrite(M2B,LOW); | |
| #define right_motor_backward() digitalWrite(M2A,HIGH); digitalWrite(M2B,HIGH); | |
| #define EN1A 9 |
This file contains hidden or 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
| char ch; | |
| void setup() { | |
| pinMode(13, OUTPUT); | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| if (Serial.available()) { |
This file contains hidden or 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 javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.*; | |
| public class SwingHelloWorld extends JFrame{ | |
| public static void main(String[] args){ | |
| SwingHelloWorld frame = new SwingHelloWorld("Hello"); | |
| frame.setSize(500,500); | |
| frame.setVisible(true); |
This file contains hidden or 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
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| Button doStuffButton = (Button) findViewById(R.id.do_stuff_button); | |
| TextView myTextView = (TextView) findViewById(R.id.textView1); | |
| //remember lowerCamelCase for buttons | |
| doStuffButton.setOnClickListener(new View.OnClickListener() { | |
| //here we send the user to the next activity |
This file contains hidden or 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
| package com.example.a1_awesome_intents; | |
| import android.app.Activity; | |
| import android.os.Bundle; | |
| import android.view.Menu; | |
| import android.view.View; | |
| import android.widget.Button; | |
| public class MainActivity extends Activity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { |
This file contains hidden or 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
| #how to specify an ssh key to use when cloning a repo in Mac | |
| ssh-agent bash -c 'ssh-add /Users/UR_USERNAME/.ssh/UR_PRIVATE_KEY; git clone git@DAS_GIT_URL' | |