Week 12: First Stage Experiment Update

On Thursday, November 1st, after we received all the parts we need for the experiment, our group starts to test and design the experiment. We made significant progress.

We connected relay, raspberry pi, and transmitter. We also implemented a simple code to turn on and off transmitter with raspberry pi.

Achievement:

  1. Make relay control transmitter work. Raspberry pi controls relay turn on / off 1 sec each.
  2. Code:

import RPi.GPIO as GPIO

import time

channel = 21

# GPIO setup

GPIO.setmode(GPIO.BCM)

GPIO.setup(channel, GPIO.OUT)

def transmitter_on(pin):

   GPIO.output(pin, GPIO.HIGH)  # Turn motor on

def transmitter_off(pin):

   GPIO.output(pin, GPIO.LOW)  # Turn motor off

if __name__ == ‘__main__’:

   try:

       transmitter_on(channel)

       time.sleep(5)

       transmitter_off(channel)

       time.sleep(5)

       GPIO.cleanup()

   except KeyboardInterrupt:

       GPIO.cleanup()

 

 

 

What we still need:

  1. Research – programming w/ iRobot
    1. Sending infrared signal back to the server, the server turns on the transmitter 1 UNTIL the robot docks at the transmitter 1. Once robot docks at t1, t1 turns off, t2 turns on immediately.
      1. The only problem is, how to program the robot so it can leave t1 immediately after arriving it.
    2. How to monitor the robot when it DOCKED
  2. Further – connect several raspberry pis with servers
  3. Further –  programming real-time automatic transmitter turn on and off
    1. Web server

Leave a comment