Error Compiling -

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
JoshuaCW2102
 
Posts: 3
Joined: Thu Apr 08, 2021 8:22 pm

Error Compiling -

Post by JoshuaCW2102 »

Hello,

I'm trying to get Arduino IDE to run this code off the board so I can monitor it live below:

Code: Select all

#Created by: Bryant Forsythe
#2/26/2021
#Alchemy Escape Rooms
#Cauldron Prop

import time
import neopixel
import board
import digitalio


# Create digital input with pull-up resistor
# for break beam sensors.

#Beam 1 Orange Wire
break_beam1 = digitalio.DigitalInOut(board.A1)
break_beam1.direction = digitalio.Direction.INPUT
break_beam1.pull = digitalio.Pull.UP

#Beam 2 Purple Wire
break_beam2 = digitalio.DigitalInOut(board.A2)
break_beam2.direction = digitalio.Direction.INPUT
break_beam2.pull = digitalio.Pull.UP

#Beam 3 Green Wire
break_beam3 = digitalio.DigitalInOut(board.A3)
break_beam3.direction = digitalio.Direction.INPUT
break_beam3.pull = digitalio.Pull.UP

#Beam 4 Yellow Wire
break_beam4 = digitalio.DigitalInOut(board.A4)
break_beam4.direction = digitalio.Direction.INPUT
break_beam4.pull = digitalio.Pull.UP

#Beam 5 White Wire
break_beam5 = digitalio.DigitalInOut(board.A5)
break_beam5.direction = digitalio.Direction.INPUT
break_beam5.pull = digitalio.Pull.UP

# Main loop runs forever and prints a message once a second
# while the sensor is blocked/broken.
count = 0
while True:
    if not break_beam1.value:
        # Break beam input is at a low logic level, i.e. broken!
        print('Beam 1 is broken!')
        time.sleep(1.0)  # Delay for 1 second and repeat again.
    if not break_beam2.value:
        # Break beam input is at a low logic level, i.e. broken!
        print('Beam 2 is broken!')
        time.sleep(1.0)  # Delay for 1 second and repeat again.
    if not break_beam3.value:
        # Break beam input is at a low logic level, i.e. broken!
        print('Beam 3 is broken!')
        time.sleep(1.0)  # Delay for 1 second and repeat again.
    if not break_beam4.value:
        # Break beam input is at a low logic level, i.e. broken!
        print('Beam 4 is broken!')
        time.sleep(1.0)  # Delay for 1 second and repeat again.
    if not break_beam5.value:
        # Break beam input is at a low logic level, i.e. broken!
        print('Beam 5 is broken!')
        time.sleep(1.0)  # Delay for 1 second and repeat again.
But whenever I upload I get the following error message: Am I missing a libary?

Arduino: 1.8.20 Hourly Build 2022/04/25 09:35 (Mac OS X), Board: "Adafruit ItsyBitsy M0 Express (SAMD21), Small (-Os) (standard), Arduino, Off"

fork/exec /Users/JoshuaClifford/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/arm-none-eabi-g++: no such file or directory
Error compiling for board Adafruit ItsyBitsy M0 Express (SAMD21).


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Last edited by adafruit_support_carter on Tue Aug 09, 2022 11:07 am, edited 1 time in total.
Reason: added [code] tags

User avatar
rooppoorali
 
Posts: 98
Joined: Sat Jul 16, 2022 12:04 pm

Re: Error Compiling -

Post by rooppoorali »

Hi, have you done the board installation meticulously according to these instructions? https://learn.adafruit.com/introducting ... -ide-setup

User avatar
adafruit_support_carter
 
Posts: 29457
Joined: Tue Nov 29, 2016 2:45 pm

Re: Error Compiling -

Post by adafruit_support_carter »

That code is CircuitPython, not Arduino.

You'll need to translate the code to Arduino.

Or if you want to try CircuitPython, general info here:
https://learn.adafruit.com/welcome-to-circuitpython
and firmware for the ItsyBitsy M0 Express here:
https://circuitpython.org/board/itsybitsy_m0_express/

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”