Main Site Documentation

Same code for several devices


#1

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?


#2

@ 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


#3

@ John - 404 :wink:


#4

Remove the ‘.’ after ‘.htm’


#5

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


#6

Many thanks for your answers I will try that ASAP