Project:USB Disco Dance Floor/v1/firmware: Difference between revisions
From London Hackspace Wiki
Project:USB Disco Dance Floor/v1/firmware (view source)
Revision as of 09:40, 7 April 2011
, 7 April 2011Fixed code
(Added details about ordering) |
(Fixed code) |
||
Line 39: | Line 39: | ||
and going back the other way: | and going back the other way: | ||
pos=0 | pos=0 | ||
while (col = read()): | while (col = read()): | ||
i = x + (pos % (w-x)) | i = x + (pos % (1+w-x)) | ||
j = y + (pos / ( | j = y + (pos / (1+w-x)) | ||
pixel[x][y] = col | pixel[x][y] = col | ||
++pos | |||
== Commands == | == Commands == |