Hello, 

I have only recently found AmForth, and have, over the last month or
so, been making led flash, getting the time from rtc, displaying
things on an lcd etc. It really has been a most enjoyable and
educational couple of months for me. I thank Matthias and the AmForth
developers for making AmForth available. I wish I had found it
earlier.

I want to put my Arduino uno to some practical use and so wish to
implement a turnkey solution. To some extent I have done this as the
code I've written below runs on powering up the uno, turns on the led
and then I can connect via a serial connection to the interpreter.

Is this the/a correct way to set up a turnkey solution? Is there a
better way?

Initially I tried the Cookbook code example

http://amforth.sourceforge.net/TG/recipes/Turnkey.html 

but I could not get it to work. Uploading the code onto a freshly
flashed uno would result in a hanging interpreter, requiring
re-flashing. I would be very grateful for any pointers as to what I am
doing wrong.

Many thanks,
Tristan
    
\ turnkey example

#include avr-values.frt
#include is.frt
#include ms.frt
#include defers.frt

$24 constant DDRB
$25 constant PORTB

1 5 lshift constant uno.led 

' turnkey defer@ Evalue tk.amforth

: tk.custom
        
    tk.amforth execute

    1000 ms

    \ init and set high uno led on pin 13   
   
    uno.led DDRB c@ or DDRB c!
    uno.led PORTB c@ or PORTB c!
;

' tk.custom is turnkey
 
\ end turnkey example

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to