I am working on grove SMT development board with micro XBEE3 with Zigbee 3.0. I am new to micropython, i don’t know which modules to import
Check page “Which features apply to my device?” of “Digi MicroPython Programming Guide” to have an idea on modules supported by XBee3 Zigbee modules… provided your modules have last firmware version 1003. Otherwise (with previous firmware version 1001) you wouldn’t even be able to set AP parameter to “MicroPython REPL” to run MicroPython.
You can also type the following in MicroPython terminal to know which MicroPython modules are supported
>>> import MODULE_NAME
to know about implemented classes/methods/constants of a particular MicroPython module (write a module’s name with no quotation marks instead of MODULE_NAME).
In contrast to XBee/XBee3 Cellular modules already supporting lot of functions, you’ll sadly discover that only few MicroPython modules/classes are currently implemented on XBee3 Zigbee devices.
For example XBee3 Zigbee lacks useful Pin class from “machine” MicroPython module. Therefore if you want to work with digital I/O, you need to use AT commands through method atcmd() of MicroPython module “xbee”.
The current XBee3 Zigbee firmware doesn’t include the analog and digital I/O classes in the machine module, so you’ll have to stick with using xbee.atcmd() (from the xbee module) to send AT commands to control the I/O pins.