Fan & Plate  is a laboratory model consisted of horizontal tube, fan and plate. Angle of the plate is a function of motor speed. Angle is measured with potentiometer, and it is then passed to the Arduino. User can write arbitrary program to control this laboratory model in Python programming language. Python is communicating with Arduino via Firmata protocol. Whole communication is abstracted from user, and user have to make only one class with controller implemented. User can download experiment results in comma separated .m file after experiment execution. Data in this file is: time, input, output.

Skeleton code is given below:


class Vent:
    #Class constructor
    #First two variables are neccessary
    #User can define other needed variables for experiment
    def __init__(self):
        self.period     = 0.125 # Sampling period
        self.duration   = 5    # Duration of experiment in seconds    #main loop
    #y - measured output of the system (angle, raw data 0-1)
    #t - current time
    def loop(self, t, y):
        u = 0.5   #pass 1 to the input of the system, can be from 0 to 1 (analog)
        return u



No votes have been submitted yet.

No one has commented it yet.