TinyOS is an event based operating environment designed for use with embedded networked sensors. It is designed to support the concurrency intensive operations required by networked sensors with minimal hardware requirements. TinyOS currently runs on the Smart Dust "macro motes". "Macro motes" are large scale models for Smart Dust that incorporate communications, processing, sensors, and batteries into a package about a cubic inch in size using commercial-off-the-shelf components. In this project, we study the TinyOS architecture and formalize its programming model in a Ptolemy II domain. Specifically, we model the event handler, command handler, and task interaction of TinyOS components in Ptolemy II using the DE, TM, and FSM domains.