summaryrefslogtreecommitdiffstats
path: root/firmware/upload.rb
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/upload.rb')
-rw-r--r--firmware/upload.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/firmware/upload.rb b/firmware/upload.rb
index 705f7de..b2537d8 100644
--- a/firmware/upload.rb
+++ b/firmware/upload.rb
@@ -12,20 +12,22 @@ else
raise "Pass intel hex or raw binary as argument to script"
end
+#test_data += ("\xFF" * 64)
+
puts "Plug in programmable device now: (waiting)"
-sleep 0.5 while MicroBoot.all.length == 0
+sleep 0.25 while MicroBoot.all.length == 0
-thinklet = MicroBoot.all.first
-puts "Attached to device: #{thinklet.inspect}"
+ubootable = MicroBoot.all.first
+puts "Attached to device: #{ubootable.inspect}"
#puts "Attempting to write '#{test_data.inspect}' to first thinklet's program memory"
#puts "Bytes: #{test_data.bytes.to_a.inspect}"
-sleep(0.1) # some time to think?
+sleep(0.25) # some time to think?
puts "Attempting to write supplied program in to device's memory"
-thinklet.program = test_data
+ubootable.program = test_data
-puts "That seems to have gone well! Telling thinklet to run program..."
+puts "Great! Starting program..."
-thinklet.finished # let thinklet know it can go do other things now if it likes
+ubootable.finished # let thinklet know it can go do other things now if it likes
puts "All done!"