MakerSpace

#MVHSMake

Posted: October 25, 2017

alot has happened since my last journal. when i left of the last one i just scanned my head but was having trouble getting it onto the computer the way we got around this was by using a different wifi for the ipad to email the scan to Mr. Hallihan who then forwarded it to me. the next thing i did was put my scan in a program called autodesk meshmixer wich ive had many crashing related problems when i tried to use the autofill feature, i got around this by using a head model already in the program and just alligned it inside mine to fill holes.after finishing the head model i exported it and put it back into tinkercad. there was some slight problems doing this though because there was holes that appeared on my torso so my work around was to take a half sphere and shape it so it resembled a torso then positioned it to fix the problem. when i finished everything i exported one more time and put it into makerbot to get it ready to print, it had to be resized so i exported it again and put it into makerbot, this time it was the right size so i saved it and started the print

Posted: October 25, 2017

Posted: October 25, 2017

Posted: October 25, 2017

Posted: October 25, 2017

Posted: October 25, 2017

Posted: October 17, 2017

##### Libraries #####

from sense_hat import SenseHat

from datetime import datetime

from time import sleep

from threading import Thread

 

##### Logging Settings ######

 

FILENAME = ""

WRITE_FREQUENCY = 1

TEMP_H=False

TEMP_P=True

HUMIDITY=True

PRESSURE=True

ORIENTATION=True

ACCELERATION=True

MAG=True

GYRO=True

DELAY=60

 

##### Functions #####

 

def log_data():

    output_string = ",".join(str(value) for value in sense_data)

    batch_data.append(output_string)

def file_setup(filename):

    header =[]

    if TEMP_H:

        header.append("temp_h")

    if TEMP_P:

        header.append("temp_p")

    if HUMIDITY:

        header.append("humidity")

    if PRESSURE:

        header.append("pressure")

    if ORIENTATION:

        header.extend(["pitch","roll","yaw"])

    if MAG:

        header.extend(["mag_x","mag_y","mag_z"])

    if ACCELERATION:

        header.extend(["accel_x","accel_y","accel_z"])

    if GYRO:

        header.extend(["gyro_x","gyro_y","gyro_z"])

    header.append("timestamp")

 

    with open(filename, "w") as f:

        f.write(",".join(str(value) for value in header)+ "\n")

def get_sense_data():

    sense_data=[]

 

    if TEMP_H:

        sense_data.append(sense.get_temperature_from_humidity())

        

    if TEMP_P:

        sense_data.append(sense.get_temperature_from_pressure())

 

    if HUMIDITY:    

        sense_data.append(sense.get_humidity())

 

    if PRESSURE:

        sense_data.append(sense.get_pressure())

 

    if ORIENTATION:

        o = sense.get_orientation()

        yaw = o["yaw"]

        pitch = o["pitch"]

        roll = o["roll"]

        sense_data.extend([pitch,roll,yaw])

 

    if MAG:

        mag = sense.get_compass_raw()

        mag_x = mag["x"]

        mag_y = mag["y"]

        mag_z = mag["z"]

        sense_data.extend([mag_x,mag_y,mag_z])

 

    if ACCELERATION:

        acc = sense.get_accelerometer_raw()

        x = acc["x"]

        y = acc["y"]

        z = acc["z"]

        sense_data.extend([x,y,z])

 

    if GYRO:

        gyro = sense.get_gyroscope_raw()

        gyro_x = ["x"]

        gyro_y = ["y"]

        gyro_z = ["z"]

        sense_data.extend([gyro_x,gyro_y,gyro_z])

 

    sense_data.append(datetime.now())

 

    return sense_data

 

def timed_log():

    while True:

        log_data()

        sleep(DELAY)

 

        

#### Main Program ####

 

sense = SenseHat()

batch_data= []

 

if FILENAME == "":

    filename = "SenseLog-"+str(datetime.now())+".csv"

else:

    filename = FILENAME+"-"+str(datetime.now())+".csv"

 

file_setup(filename)

 

if DELAY > 0:

    sense_data = get_sense_data()

    Thread(target= timed_log).start()

 

while True:

        sense_data = get_sense_data()

 

        if DELAY == 0:

            log_data()

 

        if len(batch_data) >= WRITE_FREQUENCY:

            print("Writing to file..")

            with open(filename, "a") as f:

                for line in batch_data:

                    f.write(line + "\n")

                batch_data = []

 

Posted: October 15, 2017

AttachmentSize
File nick_project_proposal_2.docx142.57 KB

Posted: October 10, 2017

Pages

Image Galleries

Added: Thu, Nov 2 2017

Videos

Added: Wed, Oct 25 2017

Documents

Jonahs Project Proposal
James project proposal
jounal #1 vynil cutting

#MVHSMake Twitter Feed