summaryrefslogtreecommitdiffstats
path: root/ruby/upload.rb
diff options
context:
space:
mode:
authorTim <cpldcpu@gmail.com>2015-06-06 22:40:52 +0200
committerTim <cpldcpu@gmail.com>2015-06-06 22:40:52 +0200
commit1548e70077127c079a801c396e2d790763b23e08 (patch)
tree233cd87a07fd1fdbb91d710e9870dd9a28111d2b /ruby/upload.rb
parent21d57991d6b321e1cc3690df9addb3b26e4145aa (diff)
parentf0bb13678d45c2c87fb3439aef50e92de1f0e52b (diff)
downloadmicronucleus-1548e70077127c079a801c396e2d790763b23e08.tar.gz
micronucleus-1548e70077127c079a801c396e2d790763b23e08.tar.bz2
micronucleus-1548e70077127c079a801c396e2d790763b23e08.zip
Merge pull request #43 from micronucleus/testing-V2-New
First release of V2.0 to master.
Diffstat (limited to 'ruby/upload.rb')
-rw-r--r--ruby/upload.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/ruby/upload.rb b/ruby/upload.rb
deleted file mode 100644
index 32aefa9..0000000
--- a/ruby/upload.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require_relative './micronucleus'
-
-if ARGV[0]
- if ARGV[0].end_with? '.hex'
- puts "parsing input file as intel hex"
- test_data = HexProgram.new(open ARGV[0]).binary
- else
- puts "parsing input file as raw binary"
- test_data = open(ARGV[0]).read
- end
-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.25 while Micronucleus.all.length == 0
-
-nucleus = Micronucleus.all.first
-puts "Attached to device: #{nucleus.inspect}"
-
-#puts "Attempting to write '#{test_data.inspect}' to first thinklet's program memory"
-#puts "Bytes: #{test_data.bytes.to_a.inspect}"
-sleep(0.25) # some time to think?
-puts "Attempting to write supplied program in to device's memory"
-nucleus.program = test_data
-
-puts "Great! Starting program..."
-
-
-nucleus.finished # let thinklet know it can go do other things now if it likes
-puts "All done!"