- Sign into AWS
- Open EC2
- Click Instances on Left Side
- Click "Launch Instance"
- Select "Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type"
- Select Free Tier
- Click review and launch
- Press Launch
- Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
- If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
- Choose Create Hosted Zone.
- For Domain Name, type your domain name.
- Choose Create.
- Click the Hosted Zone, edit record set.
- In the value, add
ec2-54-152-134-146.compute-1.amazonaws.com.
- Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
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
# Writing to a file in Python | |
# This was tested on Python 2.7. | |
# path - is a string to desired path location. The file does | |
# not have to exist. | |
# content - is a string with the file content. | |
def writeToFile(path, content): | |
file = open(path, "w") | |
file.write(content) | |
file.close() |
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
# This is an example of using Object/Classes in Python. | |
# The code has been tested with Python 2.7. | |
# My Car Object | |
class ExampleCarObject: | |
# This is the constructor so when creating the object, these are | |
# the required parameters. "self" is needed as the first parameter | |
# for all functions in the object but when call it, you do NOT | |
# pass anything in. At the bottom there is an example. | |
def __init__(self, carOwner): |
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
// Example of handling click or touch down in Unity | |
using System.Collections; | |
using System.Collections.Generic; | |
using Unity; | |
public class CharacterMovement : MonoBehaviour { | |
void start() { | |
Debug.Log("Start"); | |
} | |
void update() { |
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
// This is for changing gravity direction on the Y axis for | |
// a particular object. | |
// This is for Unity. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CharacterMovement : MonoBehaviour { | |
float FORCE_OF_GRAVITY = 9.8F; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class CharacterMovement : MonoBehaviour { | |
public float movementSpeed = 5.0f; | |
void Start() { | |
Debug.Log("Start"); | |
} |
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
# Run the following commands in the terminal/command line: | |
# pip install l293d | |
# or (I had to run as root): | |
# sudo pip install l293d | |
# | |
# I also needed to install Yaml | |
# So: | |
# pip install pyyaml | |
# or I had to run with sudo: | |
# sudo pip install pyyaml |
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
# Example of getting file content | |
def getFileContent(pathAndFileName): | |
with open(pathAndFileName, 'r') as theFile: | |
# Return a list of lines (strings) | |
# data = theFile.read().split('\n') | |
# Return as string without line breaks | |
# data = theFile.read().replace('\n', '') | |
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 RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BOARD) | |
Motor1A = 16 | |
Motor1B = 18 | |
Motor1E = 22 | |
GPIO.setup(Motor1A,GPIO.OUT) |