CrowPI-L Software Problem

Greetings:
I have a new CrowPi-L computer with modules.
I went over to the Python-Lessons-Hardware section of the software..
I followed the setup of the hardware and typed in the programs for two different programs.
I typed in the switch-light program #3 and it would not work and displayed error.
I next typed in the program for magnetic field sensor - program #5, and it would not work either.
I checked and rechecked both the wiring and the programs and they do not work.
Has anyone reported this problem.
Is there new software? that been corrected?
Please help
Thanks
Tom

Comments

  • You probably need to copy the error message to this thread, and possibly the entire code block, before anyone can help you. Then be patient, this forum is a wee bit slow...
    Chris
  • edited December 2022
    @tpetruzz Could you please post your error message? What's more, please check whether there is any content typing error or format error
  • @tpetruzz Here's the course code for #5
    import RPi.GPIO as GPIO import time GPIO.setwarnings(False) led_pin = 4 hall_pin = 5 buzzer_pin = 6 GPIO.setmode(GPIO.BCM) GPIO.setup(led_pin, GPIO.OUT) GPIO.setup(buzzer_pin, GPIO.OUT) GPIO.setup(hall_pin, GPIO.IN) while True: if (GPIO.input(hall_pin)==0): GPIO.output(led_pin, GPIO.HIGH) GPIO.output(buzzer_pin, GPIO.HIGH) time.sleep(0.5) GPIO.output(led_pin, GPIO.LOW) GPIO.output(buzzer_pin, GPIO.LOW) time.sleep(0.5) else: GPIO.output(led_pin, GPIO.LOW) GPIO.output(buzzer_pin, GPIO.LOW)
  • Here's the course code for #3
    import RPi.GPIO as GPIO import time GPIO.setwarnings(False) led_pin = 5 button_pin = 6 GPIO.setmode(GPIO.BCM) GPIO.setup(led_pin, GPIO.OUT) GPIO.setup(button_pin, GPIO.IN) while True: if GPIO.input(button_pin): GPIO.output(led_pin, GPIO.HIGH) time.sleep(0.5) GPIO.output(led_pin, GPIO.LOW)
Sign In or Register to comment.