Same code for several devices

Hello Everyone!

I would like to know if there’s a way to have the same code for several devices, for instance, I would like my application run on EMX and G400. Is there’s a way tor recognize the device at runtime and select the appropriate pin number?

@ leforban - You can see which device you are running on based on the value of Microsoft.SPOT.Hardware.SystemInfo.SystemID.Model and compare it to GHI.Processor.DeviceType. See https://www.ghielectronics.com/downloads/man/Library_Documentation_v4.3/html/851e3143-7b51-46bc-e632-56882964c577.htm

@ John - 404 :wink:

Remove the ‘.’ after ‘.htm’

http://www.ghielectronics.com/downloads/man/Library_Documentation_v4.3/html/851e3143-7b51-46bc-e632-56882964c577.htm

Many thanks for your answers I will try that ASAP