To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.spyboticsOpen lugnet.robotics.spybotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Spybotics / 184
183  |  185
Subject: 
Re: Led display on Spybot
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Tue, 28 Jan 2003 20:15:58 GMT
Viewed: 
7193 times
  
In lugnet.robotics.spybotics, André Koopman writes:
Hello all,

After a few hours I now understand a little bit about the ROM routines
inside the Spybot.

Again a few hours further spytest.h is growing !
#if defined(__SPY)

//LED display effects (0 to 7)

#define displayLedNone -1
#define displayLedScan 0
#define displayLedSparkle 1
#define displayLedFlash 2
#define displayLedRedToGreen 3
#define displayLedGreenToRed 4
#define displayLedPointForward 5
#define displayLedAlarm 6
#define displayLedThinking 7


__nolist void Disp (const int display)
{
  asm { 0xe3, &display } ;
  asm { 0x17, 42 };
  asm { 0x01, 1 };
}

//LED display count up/down

#define nDirDown 0
#define nDirUp 1

__nolist void CountDown_Bead(const int nCount,const int nDir,const int nStep)
{
  asm { 0xe3, &nCount } ;
  asm { 0xe3, &nDir } ;
  asm { 0xe3, &nStep } ;
  asm { 0x17, 97 };
  asm { 0x01, 3 };
}

//LED play animation

#define nDisplayState 1
#define nDisplayRandom 2
#define nDisplayNothing 3
#define nDisplayVars 0x10
#define nDisplayOneVar nDisplayVars + 1
#define nDisplayTwoVar nDisplayVars + 2
#define nDisplayGameTimeRemaining nDisplayVars + 3
#define nDisplayTarget 0x20
#define nDisplayRadar nDisplayTarget + 1
#define nDisplayProximity nDisplayTarget + 2
#define nDisplayAnimation 0x30  //uses 0x30 to 0x3f


__nolist void Display_Bead(const int nDisplay,const int nTime)
{
  asm { 0xe3, &nDisplay } ;
  asm { 0xe3, &nTime } ;
  asm { 0x17, 96 };
  asm { 0x01, 2 };
}

//Blinking LED's

#define nLedRed1 0x01
#define nLedRed2 0x02
#define nLedRed3 0x04
#define nLedGreen1 0x08
#define nLedGreen2 0x10
#define nLedGreen3 0x20
#define nLedYellow 0x40
#define nLedRedGreenLEDs
nLedRed1+nLedRed2+nLedRed3+nLedGreen1+nLedGreen2+nLedGreen3


__nolist void LED_Bead(const int nLED,const int nBlink,const int
nInterval,const int nTime)
{
  asm { 0xe3, &nLED } ;
  asm { 0xe3, &nBlink } ;
  asm { 0xe3, &nInterval } ;
  asm { 0xe3, &nTime } ;
  asm { 0x17, 95 };
  asm { 0x01, 4 };
}
#endif

Everything goes fine but only the yellow Led is not responding on the next
program

//Test sub 95
//sub 95 Blinking LED's
//André Koopman pa0akv@langweer.net

#include "c:\nqc\spy\spytest.h"

task main()
{
LED_Bead(nLedYellow,0,50,50);
Wait(200);
}

I understand the first value switch on the led(s) 1-2-4-8-16-32 and the
second value act like a mask 1-2-4-8-16-32 stays on.All leds respond like I
expected except the yellow one stays out !

any suggestions ?

regards André



Message is in Reply To:
  Led display on Spybot
 
Hello all, After a few hours I now understand a little bit about the ROM routines inside the Spybot. To reach the 7 LED's on top of the bot you have to call sub 42. There are 8 different way's the Led's will blink. To program the bot in BrickCC you (...) (21 years ago, 28-Jan-03, to lugnet.robotics.spybotics)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR