Driving a Mote APA102*16 ledbar using FEZ Flea

Ok, that did the trick! It works now.

1 Like

Your device is giving an error and it is not running anything. You can tell by placing a breakpoint and see if your program gets to it and you can step through the code.

Anyway, we have seen it before where a SC13 device acts weird on deploying and doing an erase all solves the problem, like Dat suggested.

  1. hold LDR button when you plug it in
  2. Connect TinyCLR config (it is in loader mode)
  3. erase all
  4. load the latest firmware.
  5. Load your application and check for errors

One more thing: where can I find documentation of the libraries and nuggets that are used for this device? I find the information very incomplete and scattered all around.
Thank you in advance.

The tutorials are for the internal libraries handling hardware tasks, like SPI bus. TinyCLR Tutorials The docs expects the user to know what SPI is.

The drivers are additional libraries to help out, like the LED driver you used TinyCLR OS Drivers

As for standard .NET services, the docs serve as a starting point to the user already know when it comes to .NET.

For those new to hardware, we have a kit and an ebook SITCore Experiment ā€“ GHI Electronics

And of course we are here to help.

Hello Gus,

Please believe me if I say that I am more than comfortable with hardware and electronics and I know my communication protocols and buses.
And I am trying to give nothing but constructive criticism, but the documentation is lacking, nowhere does it describe the how to actually connect the hardware or an example how to do is. For an absolute beginner, it is a huge learning curve.

Furthermore it is not about documentation for the .NET environment but more about the features implented in the code and what is possible to do or not. For example is it possible to poll a device for a sort of heartbeat to know itā€™s there?
What happens when a connected device loses connection, do you get an alarm, or can you poll for alarm messages?

Another example is that Dat_Tran said:

Also,

* *var led = new APA102CController(spiBus, 24);* *

24 means total led is 24 led. If you have 16 then need to be 16.

Where can I find what the arguments for this function should be and that describes them?

Also, what does the led.Flush statement do for example?

It is these kind of things that are very important to describe.

And ofcourse I appreciate your prompt response and help.

Thanks for the feedback. Weā€™ll pass on to the team.

Hi Gus,

Thanks for the reply. Could you please clarify what ā€˜ledā€™.flush does, as itā€™s not really clear and without using it after the led.SetColor() it doesnā€™t seem to work.

SetColor: Buying food and put them into bowl.
Flush: Bring food that already in bowl into stomach.

Before ā€œFlushā€, you can return food, or do whatever you want with food, not effect to stomach at all.

We can take food directly into stomach from cashier, no need middle step (bowl), but not a proper way :)).

6 Likes

Hahaā€¦ I guess Dat explained it his way

Anything you do is only effecting memory. Only calling flush will transfer that memory to the LED.

1 Like

I have another question about communicating via a pc to the fez flea board.
Apparently it should be possible using usb, since the flea board is the usb client and in normal cases it is for debugging, but can be switched using the MOD pin to a serial mode for communicating.

See this passage on the documentation page for it:

" By default, USB client support is used for deploying and debugging applications. However, deploying and debugging can be switched to a serial mode using MOD pin, freeing the USB Client port to serve other purposes.

The USB port can also be freed by completely disabling the USB debug interface, which is a feature of ip protection."

When I look at the schematics of the fez flea board, is see that the MOD pin is not really interfaced. So it is then not possible to communicate with the board using a pc?

I would like to use the flea board as a led driver for an application and the pc should send data to board so the board can show the right colours on the led strip and right animation, depending on the status of some variables outside.
Is it possible to communicate to the fez flea board in any way using a pc, or should I buy another variant such as the the fez pico?

Possible but difficult. You are better off using another board that has mod pin exposed and with UART 0 exposed as well. You need to add a serial connection to your PC for debugging.

The dev board has everything already, including a serial connection.

When I tried to drive the LED bar using SPI communication, it won`t work, there is simply not sufficient documentation. First of all: is my hardware connection OK? If not, what needs to change,

Third is there any in depth guide about how to this.And yes, I already checked the ghi electronics website and tutorials, but is very very short and missing alot of information.

We need to know what kind of LED.

I am not sure if I am missing something. I donā€™t see any hardware here.

Iā€™m actually guessing this person is just dumping their website URL here as a semi-spam. Unless thereā€™s more detail coming in their follow up posts, I would call this a non-eventā€¦

Deleted the link :joy: