Exemple #1
0
#IMPORTS
import map as map_lib
import maze_serial as m_ser
import arduinodata
import stack
import custom_print
import logic
import sys
import path
import driving

#SETUP

print = custom_print.update_print()
custom_print.start('main')

print("**********")
print("Log file opened")
print("**********")

m_ser.start()
print("Started serial communication")

map = map_lib.Map()
coords = [0, 0, 0]
map.add_room(coords)

tasks = stack.Stack()
print("Initialised stack")
Exemple #2
0
#IMPORTS
import maze_serial as m_ser
import tile
import wall
import arduinodata
import history
import stack
import custom_print
import logic
import sys
import data_storage

#SETUP

custom_print.start()

print("**********")
print("Log file opened")
print("**********")

m_ser.start()
print("Started serial communication")

tile.reset()

tile = tile.Tile()
print("Created initial tile")

current_tile = tile
print("Moved room from tile to current_tile")
Exemple #3
0
#maze 2020 arduinodata library
import data_storage
import custom_print
print = custom_print.update_print()
custom_print.start('arduinodata')


def decode(serial_string):
    print('Arduinodata decode function started')
    decoded_string = serial_string
    print('Decoded string:')
    print(decoded_string)
    decoded_string = serial_string.replace('\n', '')
    print('Decoded string without newline character:')
    print(decoded_string)
    decoded_string = decoded_string.replace('{', '')
    print('Decoded string without {:')
    print(decoded_string)
    decoded_string = decoded_string.replace('}', '')
    print('Decoded string without }:')
    print(decoded_string)
    decoded_string = decoded_string.replace(' ', '')
    print('Decoded string without spaces:')
    print(decoded_string)
    decoded_string = decoded_string.replace('"', '')
    print('Decoded string without double quotation marks:')
    print(decoded_string)
    decoded_string = decoded_string.replace('\'', '')
    print('Decoded string without quotation marks:')
    print(decoded_string)
    decoded_string = decoded_string.replace('[', '')