Vineeth Sendilraj
Published

Automated Bag Valve Mask for $250 (Ventilator)

I worked hard on making an automated Bag Valve Mask Pump. This is essentially a VENTILATOR. If we can get a doctor to help we can SAVE LIVES

IntermediateWork in progress1 hour676
Automated Bag Valve Mask for $250 (Ventilator)

Things used in this project

Hardware components

VEX IQ Motor
×2
VEX IQ Cortex
×1

Software apps and online services

Robot Mesh

Story

Read more

Schematics

Speeds and Oxygen levels

This Shows all the Speeds and Oxygen levels you can choose from

Code

Fast Speed (Adult)

Python
This provides the Fast Speed for an Adult
# VEX IQ Python-Project
import sys
import vexiq

#region config
Left  = vexiq.Motor(1) #The Ports
Right = vexiq.Motor(6, True) #The Ports # Reverse Polarity
#endregion config

def forward():
    Left.run(60)   #The Speed is in parentheses
    Right.run(60)
    sys.sleep(1.5) #The time it runs for

def backward():
    Left.run(-50)  #The Speed is in parentheses
    Right.run(-50)
    sys.sleep(1.6) #The time it runs for

while (True): #A simple while loop that makes it run forever until the "X" button is pressed on the Cortex
    forward()
    backward()

Fast Speed (Child)

Python
This provides a Fast Speed for a Child
# VEX IQ Python-Project
import sys
import vexiq

#region config
Left  = vexiq.Motor(1)       #The Ports
Right = vexiq.Motor(6, True) #The Ports # Reverse Polarity
#endregion config

def forward():
    Left.run(60)   #The Speed is in parentheses
    Right.run(60)
    sys.sleep(1) #The time it runs for

def backward():
    Left.run(-50)  #The Speed is in parentheses
    Right.run(-50)
    sys.sleep(1.2) #The time it runs for

while (True): #A simple while loop that makes it run forever until the "X" button is pressed on the Cortex
    forward()
    backward()

Normal Speed (Adult)

Python
This provides the Normal Speed for an Adult
# VEX IQ Python-Project
import sys
import vexiq

#region config
Left  = vexiq.Motor(1)       #The Ports
Right = vexiq.Motor(6, True) #The Ports # Reverse Polarity
#endregion config

def forward():
    Left.run(40) #The Speed is in parentheses
    Right.run(40)
    sys.sleep(2.1) #The time it runs for

def backward():
    Left.run(-30) #The Speed is in parentheses
    Right.run(-30)
    sys.sleep(2.3) #The time it runs for

while (True): #A simple while loop that makes it run forever until the "X" button is pressed on the Cortex
    forward()
    backward()

Normal Speed (Child)

Python
This provides the Normal Speed for a Child
# VEX IQ Python-Project
import sys
import vexiq

#region config
Left  = vexiq.Motor(1) #The Ports
Right = vexiq.Motor(6, True) #The Ports # Reverse Polarity
#endregion config

def forward():
    Left.run(40)   #The Speed is in parentheses
    Right.run(40)
    sys.sleep(1.4) #The Time it runs for

def backward():
    Left.run(-30)  #The Speed is in parentheses
    Right.run(-30)
    sys.sleep(2)   #The time it runs for

while (True): #A simple while loop that makes it run forever until the "X" button is pressed on the Cortex
    forward()
    backward()

Slow Speed (Adult)

Python
This provides a Slow Speed for an Adult
# VEX IQ Python-Project
import sys
import vexiq

#region config
Left  = vexiq.Motor(1)       #The Ports
Right = vexiq.Motor(6, True) #The Ports# Reverse Polarity
#endregion config

def forward():
    Left.run(25) #The Speed is in parentheses
    Right.run(25)
    sys.sleep(3.2) #The time it runs for

def backward():
    Left.run(-18) #The Speed is in parentheses
    Right.run(-18)
    sys.sleep(3.7) #The time it runs for

while (True): #A simple while loop that makes it run forever until the "X" button is pressed on the Cortex
    forward()
    backward()

Slow Speed (Child)

Python
This provides a slow speed for a Child
# VEX IQ Python-Project
import sys
import vexiq

#region config
Left  = vexiq.Motor(1)       #The Ports
Right = vexiq.Motor(6, True) #The Ports# Reverse Polarity
#endregion config

def forward():
    Left.run(25)   #The Speed is in parentheses
    Right.run(25)
    sys.sleep(2)   #The time it runs for

def backward():
    Left.run(-18)  #The Speed is in parentheses
    Right.run(-18)
    sys.sleep(2.5) #The time it runs for

while (True): #A simple while loop that makes it run forever until the "X" button is pressed on the Cortex
    forward()
    backward()

Credits

Vineeth Sendilraj

Vineeth Sendilraj

1 project • 2 followers

Comments