Is this normal?
Button example:
B4R version 3.90
Arduino IDE 1.8.19
Arduino UNO R3
Windows 11
Linking everything together...
"C:\\arduino\\hardware\\tools\\avr/bin/avr-gcc" -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\B4RArduino.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\B4RCore.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\B4RStream.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\Scheduler.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\b4r_main.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\src.ino.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/core\\core.a" "-LC:\\B4X\\DEVELO~1\\Button\\Objects\\bin" -lm
"C:\\arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.eep"
"C:\\arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.hex"
"C:\\arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf"
Sketch uses 6318 bytes (19%) of program storage space. Maximum is 32256 bytes.
Global variables use 292 bytes (14%) of dynamic memory, leaving 1756 bytes for local variables. Maximum is 2048 bytes.
Uploading...
********************* PROGRAM STARTING ****************
AppStart
AppStart
State: 0
State: 1
State: 0
State: 1
"C:\\arduino\\hardware\\tools\\avr/bin/avr-gcc" -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\B4RArduino.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\B4RCore.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\B4RStream.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\Scheduler.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\b4r_main.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin\\sketch\\src.ino.cpp.o" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/core\\core.a" "-LC:\\B4X\\DEVELO~1\\Button\\Objects\\bin" -lm
"C:\\arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.eep"
"C:\\arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf" "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.hex"
"C:\\arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\B4X\\DEVELO~1\\Button\\Objects\\bin/src.ino.elf"
Sketch uses 6318 bytes (19%) of program storage space. Maximum is 32256 bytes.
Global variables use 292 bytes (14%) of dynamic memory, leaving 1756 bytes for local variables. Maximum is 2048 bytes.
Uploading...
********************* PROGRAM STARTING ****************
AppStart
AppStart
State: 0
State: 1
State: 0
State: 1
Button example:
B4X:
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src
Sub Process_Globals
Public Serial1 As Serial
Private btn As Pin 'pin for the button
Private led As Pin 'pin for LED 13 on the Arduino
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
led.Initialize(13, led.MODE_OUTPUT)
btn.Initialize(btn.A0, btn.MODE_INPUT_PULLUP) 'Using the internal pull up resistor to prevent the pin from floating.
btn.AddListener("Btn_StateChanged")
End Sub
Sub Btn_StateChanged (State As Boolean)
Log("State: ", State)
'state will be False when the button is clicked because of the PULLUP mode.
led.DigitalWrite(Not(State))
End Sub
B4R version 3.90
Arduino IDE 1.8.19
Arduino UNO R3
Windows 11