Main Site Documentation

Porting the discontinued pir module driver from 4.2 to 4.3


#1

hi all,
i am kinda new to this all gadgeteer so i’m asking here, i want to use the discontinued ghi pir module (motion sensor) with the 4.3 sdk (which is not supported, the pir supports 4.2).

i saw this post : https://www.ghielectronics.com/community/forum/topic?id=16535

where someone explained how to port the t35 driver to 4.3 from 4.2 using the te35 driver.

can i do something similar with the pir driver (copy it and just change values from 4.2 to 4.3 + registery editing or something else)? or is it a lot more work or even impossible and i should find another solution?

thanks,
ofir


#2

thanks for the quick reply,

so i will try download the source and change the target framework.

sorry if this sound dumb, but the only thing i did not understand is your last line :

does that mean i need to go over the code and see if there are any functions that does not exists in the 4.3 and if so change them to something that does exists and do the same thing?

edit : nvm, i feel stupid now…
you meant to go trough my code, the one that i wrote and change things to work with the 4.3.

thank you, you helped me alot.
if i’ll have trouble porting the driver i’ll come back here.


#3

As the driver is written for 4.2 you might have a look at https://www.ghielectronics.com/docs/297/transitioning-from-4.2-to-4.3

But the PIR module is simple, so it wont be difficult, and its a good learning exercise.

Remember to post your ending code on codeshare, when you have tested it works great :slight_smile:


#4

that link seems extremely useful for me right now, thank you.

and sure, i’ll post in codeshare once everything will work and also here, if anyone ever searches for it.


#5

All discontinued modules have a separate sdk. Please find and install from the support page.


#6

I you’re going to port and rework the driver, do the world a favor and release it via NuGet?


#7

Codeshare, CodePlex, and BitBucket are source control systems. NuGet is a binary package management (i.e. binary distribution) system. One that’s integrated in VS and very easy to use, and one that VS users are used to using :slight_smile:


#8

The NuGet package can deliver the source as well as the binary, and nothing is stopping the source from being on BitBucket, GitHub, DropBox, or anywhere else…


#9

Some of you guys always talk about this but why no one is using it so far? There are many community modules and drivers and they code for the discontinued modules is open. If you guys see a value to the community, why not help others and start moving things to NuGet?


#10

Anyone who wants help, I’d be happy to help. It’s a trivially easy process.


#11

There’s a pretty good page here: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package

If someone has questions, feel free to ask me.


#12

Here is what I never get about this discussion: Why does it take a team? There must be something missing in the puzzle. It is trivially easy, but it always seems that people need others to take part and unless there is some kind of consensus, it can’t be done or isn’t worth the trivial effort.

Please don’t think I am slamming anyone - I am not at all. I just don’t get why it is often talked about but never realized. I don’t have a background with nuGet, as proven by some of my comments elsewhere recently, but to make the jump into it, I think I need to see what it does - not a description of how it would make our lives easier - but something I use that makes my life easier.

What is it about nuGet that makes it so that no one can do it unless they get help? Total newbie question I know. So, someone help us nuget newbs out. I want to believe - the truth is out there, somebody he’p me.

Thanks guys. Maybe this needs a new topic. I bet it does.


#13

NuGet is a distribution method for packages. Packages are generally libraries (such as managed NETMF drivers, like Gadgeteer module drivers).

NuGet makes finding, installing, and updating these drivers VERY EASY from the end-user end (i.e. YOUR end, @ Blue Hair Bob). No SDKs to install/uninstall, no system-wide changes, no web pages to go to, nothing to download (manually). NuGet takes care of all of it.


#14

This discussion was about the PIR driver, which could definitely be handled by NuGet. Noone said anything about the SDK.


#15

Right. Currently you have to install the whole SDK to get the driver. With NuGet, that wouldn’t be necessary (creating, distributing, and installing a whole SDK just for a driver).

You are correct that currently the NETMF SDK itself cannot be distributed via NuGet. Mostly, I think, because VS plugins can’t be installed that way.


#16

@ andre.mTo be fair, @ godefroi does have several codeshare entries and has his profile filled in :wink: