({{, MicrocontrollerCodeData[…] 
represents data about code that was generated using (PackageLink[MicrocontrollerEmbedCode, paclet:MicrocontrollerKit/ref/MicrocontrollerEmbedCode, MicrocontrollerKit Package Symbol]).}})

OpenersNotesSection(Spacer1)Details

A MicrocontrollerCodeData[…] object mcd can be used to retrieve various properties.

The list of relevant properties is given by mcd["Properties"].

General properties include:

Timer subproperties:

Serial communication subproperties:

Other properties:

The properties "PropertyAssociation" and "PropertyDataset" return computable forms of all properties.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Load the package:

Needs["MicrocontrollerKit`"]

Embed code to a target:

ℳ=MicrocontrollerEmbedCode[(NonlinearStateSpaceModelFull[2.5`, \[Null], 1, {}Automatic, ]),
<|"Target"->"ArduinoUno","Outputs"->"3"->"Analog"|>,"/dev/cu.usbmodem14101"]

Obtain a list of available properties:

ℳ["Properties"]

The microcontroller:

ℳ["Microcontroller"]

OpenersExampleSection1(Spacer1)Scope  (3)

Obtain a particular property value:

ℳ=MicrocontrollerEmbedCode[(NonlinearStateSpaceModelFull[2.5`, \[Null], 1, {}Automatic, ]),
<|"Target"->"ArduinoUno","Outputs"->"3"->"Analog"|>,"/dev/cu.usbmodem14101"];

ℳ["MachineCodeByteCount"]

Obtain several property values simultaneously:

ℳ=MicrocontrollerEmbedCode[(NonlinearStateSpaceModelFull[2.5`, \[Null], 1, {}Automatic, ]),
<|"Target"->"ArduinoUno","Outputs"->"3"->"Analog"|>,"/dev/tty.usbmodem1411"];

ℳ[{"ProgrammerName","ExternalProgrammer","Target","Microcontroller"}]

Some properties may be missing:

ℳ=MicrocontrollerEmbedCode[(NonlinearStateSpaceModelFull[2.5`, \[Null], 1, {}Automatic, ]),
<|"Target"->"ArduinoUno","Outputs"->"3"->"Analog"|>,"/dev/tty.usbmodem1411"];

ℳ["I2CAddress"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(PackageLink[MicrocontrollerEmbedCode, paclet:MicrocontrollerKit/ref/MicrocontrollerEmbedCode, MicrocontrollerKit Package Symbol])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Microcontroller Kit, paclet:MicrocontrollerKit/tutorial/Overview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Microcontroller Kit, paclet:MicrocontrollerKit/guide/MicrocontrollerKit])}})}})