Compare commits
No commits in common. "8b2782e00b37d6e94d17071b7fe570d654af56f6" and "6f99ff98bc42d5e432614ed1201c997a74148cd1" have entirely different histories.
8b2782e00b
...
6f99ff98bc
2 changed files with 9 additions and 82 deletions
|
@ -14,7 +14,3 @@ Put the =inkplate-display= script anywhere in your =$PATH=.
|
||||||
* Usage
|
* Usage
|
||||||
|
|
||||||
Run the =inkplate-display= script without any arguments. This script assumes that your Inkplate is connected, running in peripheral mode, and that the file descriptor is located at =/dev/ttyUSB0=.
|
Run the =inkplate-display= script without any arguments. This script assumes that your Inkplate is connected, running in peripheral mode, and that the file descriptor is located at =/dev/ttyUSB0=.
|
||||||
|
|
||||||
The following command-line arguments are available:
|
|
||||||
|
|
||||||
- =--reset= :: Causes a full screen update to be sent to the Inkplate instead of a partial one. Clears any artifacts from previous partial updates, but is harder on the display so shouldn't be used all the time.
|
|
||||||
|
|
|
@ -17,71 +17,7 @@
|
||||||
;; this program. If not, see <https://www.gnu.org/licenses/>.
|
;; this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(use-modules ((inkplate) #:prefix inkplate:)
|
(use-modules ((inkplate) #:prefix inkplate:)
|
||||||
(srfi srfi-19)
|
(srfi srfi-19))
|
||||||
(srfi srfi-1))
|
|
||||||
|
|
||||||
(define tips
|
|
||||||
'("Always consider the context."
|
|
||||||
"Use rules for novices, intuition for experts."
|
|
||||||
"Know what you don't know."
|
|
||||||
"Learn by watching and imitating."
|
|
||||||
"Keep practicing in order to remain expert."
|
|
||||||
"Avoid formal methods if you need creativity, intuition, or inventiveness."
|
|
||||||
"Learn the skill of learning."
|
|
||||||
"Capture all ideas to get more of them."
|
|
||||||
"Learn by synthesis as well as by analysis."
|
|
||||||
"Strive for good design; it really works better."
|
|
||||||
"Rewire your brain with belief and constant practice."
|
|
||||||
"Add sensory experience to engage more of your brain."
|
|
||||||
"Lead with R-mode; follow with L-mode."
|
|
||||||
"Use metaphor as the meeting place between L-mode and R-mode."
|
|
||||||
"Cultivate humor to build stronger metaphors."
|
|
||||||
"Step away from the keyboard to solve hard problems."
|
|
||||||
"Change your viewpoint to solve the problem."
|
|
||||||
"Watch the outliers: \"rarely\" doesn't mean \"never.\""
|
|
||||||
"Be comfortable with uncertainty."
|
|
||||||
"Trust ink over memory; every mental read is a write."
|
|
||||||
"Hedge your bets with diversity."
|
|
||||||
"Allow for different bugs in different people."
|
|
||||||
"Act like you've evolved: breathe, don't hiss."
|
|
||||||
"Trust intuition, but verify."
|
|
||||||
"Create SMART objectives to reach your goals."
|
|
||||||
"Plan your investment in learning deliberately."
|
|
||||||
"Discover how you learn best."
|
|
||||||
"Form study groups to learn and teach."
|
|
||||||
"Read deliberately."
|
|
||||||
"Take notes with both R-mode and L-mode."
|
|
||||||
"Write on: documenting is more important than documentation."
|
|
||||||
"See it. Do it. Teach it."
|
|
||||||
"Play more in order to learn more."
|
|
||||||
"Learn from similarities; unlearn from differences."
|
|
||||||
"Explore, invent, and apply in your environment--safely."
|
|
||||||
"See without judging and then act."
|
|
||||||
"Give yourself permission to fail; it’s the path to success."
|
|
||||||
"Groove your mind for success."
|
|
||||||
"Learn to pay attention."
|
|
||||||
"Make thinking time."
|
|
||||||
"Use a wiki to manage information and knowledge."
|
|
||||||
"Establish rules of engagement to manage interruptions."
|
|
||||||
"Send less email, and you’ll receive less email."
|
|
||||||
"Choose your own tempo for an email conversation."
|
|
||||||
"Mask interrupts to maintain focus."
|
|
||||||
"Use multiple monitors to avoid context switching."
|
|
||||||
"Optimize your personal workflow to maximize context."
|
|
||||||
"Grab the wheel. You can’t steer on autopilot."))
|
|
||||||
|
|
||||||
(define (my-wrap text max-length)
|
|
||||||
(reverse
|
|
||||||
(map string-trim
|
|
||||||
(fold
|
|
||||||
(λ (item accumulator)
|
|
||||||
(let* ((current-line (car accumulator))
|
|
||||||
(new-line (format #f "~a ~a" current-line item)))
|
|
||||||
(if (> (string-length new-line) max-length)
|
|
||||||
(cons item accumulator)
|
|
||||||
(cons new-line (cdr accumulator)))))
|
|
||||||
'("")
|
|
||||||
(string-split text #\ )))))
|
|
||||||
|
|
||||||
(let* ((my-dev (inkplate:open "/dev/ttyUSB0"))
|
(let* ((my-dev (inkplate:open "/dev/ttyUSB0"))
|
||||||
(date (current-date))
|
(date (current-date))
|
||||||
|
@ -164,22 +100,17 @@
|
||||||
(inkplate:set-text-size my-dev 4)
|
(inkplate:set-text-size my-dev 4)
|
||||||
(inkplate:print my-dev (inkplate:convert-string-to-hex "S")))
|
(inkplate:print my-dev (inkplate:convert-string-to-hex "S")))
|
||||||
|
|
||||||
|
(inkplate:set-cursor my-dev 265 15)
|
||||||
(inkplate:set-text-size my-dev 3)
|
(inkplate:set-text-size my-dev 3)
|
||||||
(inkplate:set-text-wrap my-dev #f)
|
(inkplate:set-text-wrap my-dev #f)
|
||||||
|
(inkplate:print my-dev (inkplate:convert-string-to-hex "Choose your own tempo for an"))
|
||||||
|
(inkplate:set-cursor my-dev 265 45)
|
||||||
|
(inkplate:set-text-size my-dev 3)
|
||||||
|
(inkplate:set-text-wrap my-dev #f)
|
||||||
|
(inkplate:print my-dev (inkplate:convert-string-to-hex "email conversation"))
|
||||||
|
|
||||||
(let loop ((lines (my-wrap (list-ref tips (random (length tips)
|
|
||||||
(random-state-from-platform)))
|
|
||||||
29))
|
|
||||||
(x 265)
|
|
||||||
(y 15))
|
|
||||||
(inkplate:set-cursor my-dev x y)
|
|
||||||
(inkplate:print my-dev (inkplate:convert-string-to-hex (car lines)))
|
|
||||||
(unless (null? (cdr lines))
|
|
||||||
(loop (cdr lines) x (+ 30 y))))
|
|
||||||
|
|
||||||
(if (member "--reset" (command-line))
|
|
||||||
(inkplate:update my-dev)
|
|
||||||
(inkplate:partial-update my-dev 15 800 600))
|
|
||||||
|
|
||||||
|
(inkplate:partial-update my-dev 15 800 600)
|
||||||
(inkplate:send my-dev)
|
(inkplate:send my-dev)
|
||||||
|
|
||||||
(inkplate:close my-dev))
|
(inkplate:close my-dev))
|
||||||
|
|
Loading…
Reference in a new issue