digiusb 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/digiterm +6 -5
- metadata +33 -1
data/bin/digiterm
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
$:.unshift File.dirname(__FILE__) + "/../lib"
|
3
3
|
require 'digiusb'
|
4
|
+
require 'colored'
|
4
5
|
require 'io/console'
|
5
6
|
|
6
|
-
puts "Looking for Digispark running DigiUSB..."
|
7
|
+
puts "Looking for Digispark running DigiUSB...".blue
|
7
8
|
|
8
9
|
sleep 0.25 until DigiUSB.sparks.length > 0
|
9
10
|
spark = DigiUSB.sparks.last
|
10
11
|
|
11
|
-
puts "Attached to #{spark}"
|
12
|
-
puts "Type control + c to exit"
|
12
|
+
puts "Attached to #{spark.inspect.green}".blue
|
13
|
+
puts "Type control + c to exit".blue
|
13
14
|
|
14
15
|
begin
|
15
16
|
loop do
|
16
|
-
print spark.getc
|
17
|
+
print spark.getc.green
|
17
18
|
|
18
19
|
begin
|
19
20
|
char = IO.console.read_nonblock(1)
|
@@ -22,7 +23,7 @@ begin
|
|
22
23
|
end
|
23
24
|
end
|
24
25
|
rescue LIBUSB::ERROR_PIPE
|
25
|
-
puts "Digispark disconnected or crashed"
|
26
|
+
puts "Digispark disconnected or crashed".white_on_red
|
26
27
|
rescue Interrupt
|
27
28
|
puts ""
|
28
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digiusb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -27,6 +27,38 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 0.2.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: colorist
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 0.0.2
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.0.2
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: colored
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.2'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.2'
|
30
62
|
description: ! "A tiny library for talking to digispark (a small arduino clone) over
|
31
63
|
usb a bit like talking\n to a real arduino through a serial port! This library
|
32
64
|
works with the DigiUSB library built in to Digistump's\n version of the Arduino
|