BRYAN (Moral Development)

Building Respectful Young Achievers Now

Our technical solution to a robotic toy for moral development is BRYAN.  BRYAN is a robot that is powered by 3 keys.  The ideal usage of BRYAN is by a group of 3 children who each received 3 colored keys, which leaves 9 keys total in the game.  Theoretically, in individual can power the car themselves, inserting 3 keys of the same color.  This combination results in BRYAN moving slowly and only for about a foot.  Using 2 of one color and 1 of another allows BRYAN to move further than the previously mentioned combination, but BRYAN still does not complete the course.  BRYAN will only cross the finish line when maximum teamwork is used, meaning each player contributes 1 key to the car.

In more technical terms, the code reads the color of the keys used through LEGO color sensors.  Then, the number values are sorted to determine how many of each color key was used.  Finally, based on the how many of each color was used, the code sends power to the motor to make BRYAN move predetermined distances as discussed above.

Image Image Image

Code:

!/usr/bin/python3

ev3 = Device("this")

def manageRange(n):

return max(min(n,1050),-1050)

def main():

2 = Blue3 = Green5 = Red

sensor_1 = None

sensor_2 = None

sensor_3 = None

sensor_4 = None

occurrence_array = []

one_array = [1, 1, 2]

two_array = [0, 2, 2]

three_array = [0, 1, 3]

four_array = [0, 0, 4]

sensor_array = [0, 0, 0, 0]

motorB = ev3.LargeMotor('outD')

motorC = ev3.LargeMotor('outC')

read each sensor and store in first array

sensor_1 = ev3.ColorSensor('in1').color

print(sensor_1)

sensor_array[0] = sensor_1

sensor_2 = ev3.ColorSensor('in2').color

print(sensor_2)

sensor_array[1] = sensor_2

sensor_3 = ev3.ColorSensor('in3').color

print(sensor_3)

sensor_array[2] = sensor_3

sensor_4 = ev3.ColorSensor('in4').color

print(sensor_4)

sensor_array[3] = sensor_4

print(sensor_array)

occurrence_array.append(sensor_array.count(5))

occurrence_array.append(sensor_array.count(3))

occurrence_array.append(sensor_array.count(2))

print(occurrence_array)

occurrence_array.sort()

print(occurrence_array)

if occurrence_array == one_array:

motorB.run_forever(speed_sp = 500,stop_action="brake")

motorC.run_forever(speed_sp = 500,stop_action="brake")

sleep(3)

if occurrence_array == two_array:

motorB.run_forever(speed_sp = 400,stop_action="brake")

motorC.run_forever(speed_sp = 400,stop_action="brake")

sleep (2)

elif occurrence_array == three_array:

motorB.run_forever(speed_sp = 300,stop_action="brake")

motorC.run_forever(speed_sp = 300,stop_action="brake")

sleep(2)

elif occurrence_array == four_array:

motorB.run_forever(speed_sp = 200,stop_action="brake")

motorC.run_forever(speed_sp = 200,stop_action="brake")

sleep(1)

if name == 'main':

main()

Conclusions:

From a technical standpoint, BRYAN functioned very well.  The sensors functioned better with the keys, which we updated from the fuel discs.  We utilized a racecourse made of paper in this iteration, which allowed the technical team to make more precise distances and the children to compare their results of each trial more efficiently.

Overall, BRYAN was a very successful robotic toy to aid in the moral development domain.  He generated many smiles and at the end of using him, children were encouraged to work together.  In the scope of this class, BRYAN was victorious in achieving its goals and we believe could be taken a larger scale if desired.