Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
TelldusNETWrapper t = new TelldusNETWrapper();
t.tdRegisterRawDeviceEvent(EventCallbackFunction, null);
}
public int EventCallbackFunction(string data, int controllerId, int callbackId, Object obj)
{
listBox1.Items.Add(DateTime.Now + data);
return 0;
}
It works and as soon as the temp sensor sends it value it shows up in the listbox. But it works only once, then it stops. What am I doing wrong?