This is a port of the mruby/c tutorial Chapter 03 to the mbed environment.

Dependencies:   mbed

For details, refer to the following.

http://www.s-itoc.jp/activity/research/mrubyc/mrubyc_tutorial/436

Note:There is a change in rtt0.h from the original source in the mruby/c. It was necessary for inclusion in C ++ source.

sample1.rb

Committer:
tk_takateku
Date:
2017-02-15
Revision:
0:33feccbba3ff

File content as of revision 0:33feccbba3ff:

led = 0
while(true)
	if(led == 0)
		led = 1
	else
		led = 0
	end
	if($sw1 == 0)
		led = 1
	end
	led1_write( led )
	puts led
	delay 100
end