Can I use the arm 4.1 on Adafruit PyGamer and PyBadge


#1

Just got the Adafruit PyGamer and PyBadge and start to … then found out the page said arm 3.2. Is there a link to that version. Can’t find it (well not seriously looking but seems no link to older version)? Or I can use the latest arm4.1.

After that, I supposed just download the ardinuo, put the code (arm x.x, graphic plus game code) cinto the serial terminal and try some games. Then start to hack the code. Just want the x.x right. Thanks in advance.


#2

I can run simple ulisp program but most of the pybadge code return error:

sample session, first part just demo it is basically work. I guess I might need the Arm 3.2?

12:13:48.571 -> (+ 1 2)
12:13:48.571 -> 3
12:13:48.571 ->
12:13:48.571 -> 20607> (defun sq(x) (* x x))
12:14:06.603 -> sq
12:14:06.603 ->
12:14:06.603 -> 20594> (sq 200)
12:20:58.898 -> 40000
12:20:58.898 ->
12:20:58.898 -> 20594> (defun b () (pinmode 13 t) (loop (digitalwrite 13 t) (delay 1000) (digitalwrite 13 nil) (delay 1000)))
12:22:06.235 -> b
12:22:06.235 ->
12:22:06.235 -> 20560> (b)
12:22:50.025 -> Error: escape!
12:22:50.125 -> 20560> (defun gprint () (fill-screen) (set-rotation 2) (with-gfx (str) (set-cursor 0 0) (pprintall str)))
12:27:55.656 -> gprint
12:27:55.656 ->
12:27:55.689 -> 20530> (gprint)
12:28:30.179 -> Error: ‘with-gfx’ not supported
12:28:30.279 -> 20530> (defun rgb (r g b) (logior (ash (logand r #xf8) 8) (ash (logand g #xfc) 3) (ash b -3)))
12:29:21.214 -> rgb
12:29:21.214 ->
12:29:21.214 -> 20492> (defun badgesketch () (let ((x 80) (y 64)) (loop (let* ((r (readbadgebuttons)) (dy (- (logand 1 (ash r -2)) (logand 1 (ash r -1)))) (dx (- (logand 1 (ash r -3)) (logand 1 r)))) (if (> r 32) (fill-screen 0)) (draw-line x y (incf x dx) (incf y dy)) (delay 10)))))
12:30:02.247 -> badgesketch
12:30:02.247 ->
12:30:02.247 -> 20382> (badgesketch)
12:30:14.244 -> Error: undefined: readbadgebuttons
12:30:14.344 -> 20382> (defun plot () (dotimes (xx 320) (let ((x (- xx 160))) (dotimes (yy 240) (let* ((y (- yy 120)) (f (truncate (+ (* x (+ x y)) (* y y)) 8))) (draw-pixel xx yy (rgb (+ f 160) f (+ f 80))))))))
12:31:11.058 -> plot
12:31:11.058 ->
12:31:11.058 -> 20302> (plot)
12:31:32.446 -> nil
12:31:32.446 ->
12:31:32.446 -> 20302>


#3

The Adafruit PyGamer and PyBadge page should have said “Version 3.2 or later”. I’ve fixed it now.

It looks like everything’s working fine for you. A few tips:

  • Uncheck Show timestamp in the Serial Monitor to get rid of that annoying time prefix to the uLisp prompt.

  • You need to uncomment #define gfxsupport at the start of the uLisp source, and upload it again, to use the graphics.

  • badgesketch needs the function readbadgebuttons, which is defined earlier on that page.

Let me know how you get on!


#4

Got a message

“Adafruit_GFX.h: No such file or directory”

Try to find any missing library.


#5

Done after upload in the library the two missing library (GFX and 3755 some number like that) and run the step in accordance to you doc. All work now. Thanks.


#6