Connect to Arduino Using Forth

How to connect to Arduino using the forth programming language - (SwiftForth)

I will show you how to connect to Arduno Uno that already has FlashForth burned onto the chip.

Once connected, we will start flipping bits directly on the chip itself.

Typically with the Arduino IDE we would have to flash and re-flash our code onto the chip in order to see it run. This flash and pray approach to programming can get tedious.

But not so with forth. SwiftForth allows us to connect via the serial com port to the Arduino and control ports and addresses directly.

\ How to blink the built-in led for FlashForth on Arduino Uno
\ Type in blink to see it in action
$24 constant ddrb
$25 constant portb
1 #5 lshift constant bit5

: init bit5 ddrb mset ;
: toggleled portb c@ bit5 xor portb c! ;
: blink init begin toggleled #500 ms key? until ;

Download enumports.f to enumerate com ports

https://code4thcode.gumroad.com/l/enumports