Project:USB Disco Dance Floor/v1/firmware: Difference between revisions

From London Hackspace Wiki

Fixed code
(Added details about ordering)
(Fixed code)
 
Line 39: Line 39:
and going back the other way:
and going back the other way:


<!-- TODO: check this code -->
  pos=0
  pos=0
  while (col = read()):
  while (col = read()):
   i = x + (pos % (w-x))
   i = x + (pos % (1+w-x))
   j = y + (pos / (h-y))
   j = y + (pos / (1+w-x))
   pixel[x][y] = col
   pixel[x][y] = col
  ++pos


== Commands ==
== Commands ==
Anonymous user