0

There is a special function used in NXC called ReadColorSensorEx():

int ReadSensorColorEx   (   const byte &    port,
int &   colorval,
unsigned int &  raw[],
unsigned int &  norm[],
int &   scaled[] 
)   

But I cannot use exactly the same function in F# libraries.

norm[] type is for normalized color values, and scaled[] variable is scaled color values fetched by NXT Color Sensor.

But in MonoBrickFirmware.dll library which is used by F#, I couldn't find any way to fetch these two values.

NXC is not a .NET based programming language. NXC is a language developed for programming Lego NXT bricks.

NXC is using a special library for ReadColorSensorEx() function.

Is there a way to merge NXC code and it's libraries with F#?

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
yusuf
  • 3,591
  • 8
  • 45
  • 86
  • 1
    If the library is written in .net, then it is available in F#. Can you be more specific about what you're looking for and give an example of how you're trying to use it in F#? – N_A Jan 01 '15 at 15:14
  • Okay mydogisbox, I'll edit my question right now. – yusuf Jan 01 '15 at 17:07
  • 1
    How is this different from your previous question here:https://stackoverflow.com/questions/27666573/readsensorcolorex-function-in-nxc-and-its-conversion-in-monobrickfirmware-lib – John Palmer Jan 01 '15 at 21:22
  • John Palmer, the difference is; here, I'm asking whether is it possible to merge NXC with F# on the same environment, but the other question is asking how can I fetch NXT Color Sensor raw, normalized, and scaled color values as 4 bytes of arrays via using MonoBrickUsing library in F#. I couldn't find a way to do that, that's why I'm asking this question. – yusuf Jan 01 '15 at 21:45

0 Answers0