Emulator

I’d like to write and debug grove pi programs on my laptop. Has anyone written a library that can be used for this?

Not that we know of. Do you have an example of this for other hardware devices? Just curious!

Yes and no. I’ve seen emulators at much lower level. But nothing at grovepi library level. I thought I would do a first attempt as follows:

  1. Replace grovepi.py with emulated_grovepi.py (which I write). I will trap calls to read and write functions.

  2. For read of sound data, I will supply mock data.

  3. For write of led, I will signify that led has switched state.

Expect to be able to do this from laptop - way to test your code somewhat before moving to actual hardware. I can report back here with results. But if anyone knows of a similar project, please let me know.

Hey fickas,
We have not seen anything similar being done for the grovepi but it would be pretty useful for a lot of people. Do keep us updated on the progress with it.

-Karan