Can I use these examples for a series 2 radio?

Can I use these examples for the series 2 radios?

http://examples.digi.com/sensors/802-15-4-analog-input-with-a-potentiometer/

http://examples.digi.com/lights-motors-more/wireless-panel-meter/

No you can’t as the XBee ZB module does not function the same way as the 802.15.4 does.