Returns information about the imp on which your code is running
Device (from impOS™ 36)
Squirrel meta object with a key type — its value is a string indicating the imp type
This method returns a table containing information about the imp, accessed through the following keys:
|type||String||The type of imp:
The object returned by imp.info() is not a Squirrel table, but a ‘meta’ object. This means the returned object can’t be examined as might a table — for example, using
foreach to iterate over keys and values. However, its properties are accessed in the same way, using dot syntax as shown in the example below.
The following code snippet shows how a customer might use imp.info() to support multiple versions of a product, each based on a different imp type, in the same application code by aliasing application peripherals to imp-specific objects.