Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : colour micromite
Author | Message | ||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
for your amusement, a little micromite demo i put together this afternoon that uses VT100 commands to set colour, X,Y position, and some (limited) character attributes: clrscr
Print at$(21,3) colour$(4) "Colour MicroMite Demonstration" For B=30 To 37 For C=40 To 47 Print at$((B-25)*4, C-35) colour$(1, B, C) "abcd" Next C: Next B Print at$(1, 20) colour$() "press enter to exit "; Line Input a$ End Function at$(x,y) at$=Chr$(27)+"["+Str$(Y)+";"+Str$(X)+"H" End Function Function colour$(A, B, C) Local temp$ temp$=Chr$(27)+"["+Str$(A)+"m" If B<>0 Then temp$=temp$+Chr$(27)+"["+Str$(B)+"m" If C<>0 Then temp$=temp$+Chr$(27)+"["+Str$(C)+"m" colour$=temp$ End Function Sub clrscr Print Chr$(27)+"[2J" End Sub for the colour$ function the values to use can be found at the end of this page: http://www.termsys.demon.co.uk/vtansi.htm the 'blink' attribute doesn't seem to work for me with teraterm. note that if the program exits without a colour$(0) or colour$() then the micromite editor seems to miss resetting the colour attribute for the 2nd to last line of the screen. enjoy, rob :-) |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2817 |
WOW - I really like that! Could open up some very interesting possibilities with Geoff's VT Terminal Module that he said he might possibly design one day! For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2817 |
rob, On my 44-pin MicroMite module, if you press the reset button during the process of drawing the 'matrix', then TeraTerm's window keeps the background colour equal to that which was drawn at the time of reset! Also the 'Colour MicroMite Demonstration' heading text is likewise in the colour too equal to the foreground colour that was being drawn. The MicroMite has more colours than the MaxiMite For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
Print this page |