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
red = '\033[1;31;49m' | |
green = '\033[1;32;49m' | |
#Any '\033' is a color code that changes the color of the text that follows. | |
#the definition convert: converts a number (0-255) to a binary octet. any number above 255 will return as 255 in binary | |
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
#this program is currently without comments- this is the first draft and will be simplified and added to. | |
#constructed by Tanner Martin- 9-30-16 - 4 hour completion time. | |
import random | |
import time |
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
__author__ = 'Tanner Ray Martin' | |
#this is for python 3, for python 2: change input to raw_input | |
import serial | |
#serial is the main module used and needs to be installed | |
import time | |
''' |
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
class converter: | |
def __init__(self): | |
self.ip = input('Enter an IP Address: ') | |
self.binary = [128,64,32,16,8,4,2,1] | |
self.empty_list = [] | |
def convert(self, number): | |
empty_string = '' | |
number = int(number) | |
for num in self.binary: |