Start for FEZ Cerbuino Bee

Hi, I have bought couple of FEZ Cerbuino Bees,spiders and many modules for my project.
I am updating the Newest SDK and related software.
For the spider, I have experience for using it.
But it is my fist time using the FEZ Cerbuino Bee.
I don’t know how to start it.
Should I open a new plain NETMF project or new Gadgeteer project?
I can use the Xbee on my FEZ domino and Spider, but don’t know how to use it in FEZ Cerbuino Bee.
Any example? I am confused, How can i use the plain NETMF project and the Gadgeteer in the same time?


You can use either a plain NETMF or Gadgeteer but since it’s got Gadgeteer sockets you should start with a Gadgeteer project in my option.
You can use plain NETMF in the Gageteer project so use both if you want.

Here is some sample code for a XBee

using System;
using System.IO.Ports;
using System.Text;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
namespace GadgeteerApp1
    public partial class Program
        bool state = true;
        SerialPort xbee = new SerialPort("COM1",9600);
        void ProgramStarted()
            xbee.DataReceived += new SerialDataReceivedEventHandler(xbee_DataReceived);
            GT.Timer timer = new GT.Timer(500);
            timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
        void xbee_DataReceived(object sender, SerialDataReceivedEventArgs e)
             //Do stuff here
        void timer_Tick(GT.Timer timer)
            state = !state;
            byte[] buffer = Encoding.UTF8.GetBytes(DateTime.Now.ToString() + "\r\n");
            xbee.Write(buffer, 0, buffer.Length);

I think the answer requires a little more info about what you’re trying to do. In general, I would agree with Justin. However, depending on what you are connecting to the Cerbuino it may be more efficient to start with a NETMF project if you do not require Gadgeteer drivers. The Gadgeteer framework does have some overhead that can be avoided if you do not require it. I suspect that you went with the Cerbuino because you have some shields you want to use. What all are you connecting to that bad boy?

@ Justin: Thank you very much. Very Useful. I will try it.
@ ianlee74 : For this project, I will not connect anything to the FEZ Cerbuino Bee.
Just send some information(such as ID, position…) from couples of FEZ Cerbuino Bee to the Base Station.
I will use the spider to build the base station. The base station should have GPS, GPRS, SD Card, Xbee, Ethernet or Wifi.
The Base station will receive the data from the FEZ Cerbuino Bee,then uploading the data to remote web server.
So I think the plain NETMF project is good for my FEZ Cerbuino Bee for this project.

[quote=“Tzu Hsuan”]@ ianlee74 : For this project, I will not connect anything to the FEZ Cerbuino Bee.
Just send some information(such as ID, position…) from couples of FEZ Cerbuino Bee to the Base Station.

Sounds interesting!

Just curious … how will the Bee send position without anything connected to it?

I’m confused. How do you plan to collect data with a Cerbuino w/o any sensors connected to it? How do you plan to transmit that data to the base station without some sort of ethernet/XBee/WiFi/etc. also connected? I Cerbuino by itself is pretty useless :wink:

LOL that’s nearly a hanging offence init?

I know I waste the ability of the FEZ Cerbuino Bee, it can do more than I am doing.
I can explain a little.
Generally speaking, my project is like a long distance RFID system.(more than 1 km)
When a bridge is damaged, the sending nodes on the bridge will send its ID to the base station. The base station will then send the data to remote server.
The base station and the remote server have a check table or database can identify these IDs. Each ID represent a position of the component on the bridge.
So I can know where the bridge is damaged.
For our approach, we only need to send ID wirelessly,we don’t; need sensor.(I can’t tell more detail now, maybe later).
So use the FEZ Cerbuino Bee is more easily to prototype our approach. we can just plug the xbee to it then use it.
But in final product, I think more cheaper and simple solution is needed.
Does the Xbee can send the data directly without using any MCU?
Maybe you can give me any suggestion for the sending node.

Yes. An XBee has built-in basic GPIO & analog pins that you could probably use for this purpose w/o using a separate microcontroller. Google “XBee I/O” and you’ll find plenty of references. You would just need an XBee adapter to program it using X-CTU and then provide power to it in production. Here’s a place to start:

@ ianlee74
Thanks, Very useful.
By the way.
To update Firmware of FEZ Cerbuino Bee is more complicated.

My pleasure.

Yes, unfortunately it is…

Do you have a plan for how to generate your IDs? The devices do not have device IDs in them. If you need some starter classes for doing an ID or XBee take a look at my classes, I built them both on Cerbuino Bees. - Device ID, requires a microSD - XBee controller

Why not just use the XBee ID?

@ PintSize.Me
Thanks for your code, I will read it.
@ ianlee74
Yes, can just use the XBee ID.Thanks.

@ ianlee74, I would say because not all devices have XBee’s, though in Tzu’s case they might.

Tzu & ianlee74,
How do you get the XBee’s ID from the cerb?

@ PintSize.Me - Send the AT commands SH and SL to the xbee

Doesn’t issuing AT commands require pins that are not connected on the CerbuinoBee?

Maybe I’m not intimate enough with XBee. Are those commands not sent through the usual RX/TX pins (2 & 3)?

You are correct, the problem I was always having is that I hadn’t noticed the need to start with +++, I thought you had to use one of the other pins to put it into a command mode but I was wrong.