FEZ Cerbuino Bee Issue

Just got my Bee in the mail and have followed the instructions here. http://www.tinyclr.com/forum/topic?id=6927
And am still getting a “An unhandled exception of type ‘System.NotImplementedException’ occurred in Microsoft.SPOT.TinyCore.dll” not sure where to go from here…

Any suggestions???

Have you read the Beginners EBook?

You have provided very little information…

Have you loaded the latest firmware to the board?
What were you trying to do when you got the unsupported exception?

I have read the ebook and i have the firmware it came with on it…

I am basically trying to run the basic 4.2 gageteer project…

using Gadgeteer;
using GTM = Gadgeteer.Modules;

namespace GadgeteerApp2
{
    public partial class Program : Gadgeteer.Program
    {
        // GTM.Module definitions

        public static void Main()
        {
            //Important to initialize the Mainboard first
            Mainboard = new GHIElectronics.Gadgeteer.FEZCerberus();			

            Program program = new Program();
            program.InitializeModules();
            program.ProgramStarted();
            program.Run(); // Starts Dispatcher
        }

        private void InitializeModules()
        {   
            // Initialize GTM.Modules and event handlers here.
        }
    }
}

however i am able to get this to work … successfully…


  public partial class Program : Gadgeteer.Program
    {
        // This method is run when the mainboard is powered up or reset.   

        public static void Main()
        {
            //Important to initialize the Mainboard first
            Mainboard = new GHIElectronics.Gadgeteer.FEZCerberus();

            var led = new OutputPort((Cpu.Pin)GHI.OSHW.Hardware.FEZCerberus.Pin.PB2, false);
            led.Write(true);


            Debug.Print("Program Started");
            Thread.Sleep(Timeout.Infinite);
            
        }

        public FEZCerberus Board { get { return Mainboard as FEZCerberus; } }

    }


basically i have narrowed it down to external code from my apps IMHO.

Is it the gageteer install that is wrong or the .net mf 4.2 install?? or any other advice??

There will be a new SDK with much better firmware coming soon, probably tomorrow.

Kinda no fun to have toy in hand and no go … Thanks for the time frame though…

You can make it work, but I would hate it if you get a bad first impression. You have some very powerful device in your hand that can do magic :slight_smile:

I just want to replace my panda 2 with it to control my irrigation and hvac this week so that it can better communicate with my web api for home control… I know magic I remember when i thought panda 2 was the coolest thing next to a mega… and it has been running my HVAC since last March… I must say it is a good device also … but need some internet this time around… So very excited to have this new device…

You can’t just tease us like that! We want to see pictures of panda in your system. Or even a video.

Gus, I actually think he’s learnt from the master of the “forum tease”. :wink:

1 ds18b20 and 3 S108T02 Solida State Relays…

Really pretty simple… will add pic when i get home…



using System;
using System.Threading;

using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.FEZ;
using System.Collections;
using System.Text;
using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.USBClient;
using Fez.IO;

namespace HouseControl
{
    public class Program
    {
        static OutputPort led;
        private static ArrayList lasttemp;
        static AutoResetEvent are = new AutoResetEvent(false);

        static OutputPort heat;
        static OutputPort fan;
        static OutputPort cool;
        static FezTermHost term;
        static readonly byte newLine = 255;

        public static void Main()
        {
            led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, false);
            heat = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.Di47, false);
            fan = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.Di49, false);
            cool = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.Di51, false);

            for (int i = 0; i < 3; i++)
            {
                Blink();
                Blink();
                Blink(200, 800);

            }

            can_cool = true;
            can_heat = false;
            off = true;
            
            term = new FezTermHost(newLine);
            term.MessageReceived += (command) =>
            {
                RunCommand(command);
            };

            term.Stopped += () => are.Set();
            term.Start();

            status = "Start UP....";

            Debug.EnableGCMessages(false);

            mintemp = 66.0;
            maxtemp = 67.0;

            lasttemp = new ArrayList();

            var therm = new CircuitPeople.Thermometer((Cpu.Pin)FEZ_Pin.Digital.Di8);
            temp_mon = new CircuitPeople.ThermometerWatcher(therm);
            temp_mon.TemperatureChanged += (from, to) =>
            {
                var temp = to;
                if (!off)
                {
                    
                    if (lasttemp.Count == 20)
                    {
                        lasttemp.RemoveAt(0);
                    }


                    if (lasttemp.Count == 0 || (float)lasttemp[lasttemp.Count - 1] != temp)
                    {
                        if (temp > maxtemp)
                        {
                            cooling = true;

                        }
                        else if (cooling && temp > mintemp)
                        {
                            cooling = true;

                        }
                        else if (cooling && temp <= mintemp)
                        {
                            cooling = false;
                        }


                        //cooling = maxtemp < temp;
                        //heating = mintemp >  temp;

                        var output = mintemp.ToString() + ", " + maxtemp + ", " + temp.ToString();
                        //byte[] bytes = System.Text.Encoding.UTF8.GetBytes(output + "\r\n");
                        //Debug.Print(output);

                        //term.WriteMessage(output);
                        status = output;
                        //host.Write(output);


                    }
                    lasttemp.Add(temp);
                }
                else
                {
                    status = mintemp.ToString() + ", " + maxtemp + ", " + temp.ToString();
                }

            };
            temp_mon.Start();
            


     
            are.WaitOne();


        }

        public static void Reset()
        {
            cool.Write(false);

            heat.Write(false);
            fan.Write(false);
        }




        public static double GetLastTempAVG(ArrayList temps, double temp)
        {
            var val = 0.0;
            foreach (var item in temps)
            {
                val += (float)item;
            }
            if (temps.Count == 0) { return temp; }
            return val + temp / temps.Count + 1;

        }


        public static void Blink(int ms = 200, int after = 200)
        {
            lock (led)
            {
                led.Write(true);
                Thread.Sleep(ms);
                led.Write(false);
                Thread.Sleep(after);
            }
        }


        public static void RunCommand(string command)
        {
            if (command == "off")
            {
                led.Write(false);
                off = true;
                Reset();
                return;
            }
            if (command == "on")
            {
                led.Write(true);
                off = false;
                Reset();
                return;
            }
            if (command == "cool")
            {
                cooling = true;
                return;
            }
            if (command == "fan")
            {
                //cooling = true;
                return;
            }
            if (command == "heat")
            {
                //cooling = true;
                return;
            }
            if (command == "status")
            {
                var temp = temp_mon.GetTemp();
                term.WriteMessage(mintemp.ToString() + ", " + maxtemp + ", " + temp.ToString() + ", " + (off && (!cooling && !heating) ? "OFF" : "") + (cooling ? "COOL" : "") + (heating ? "HEAT" : ""));
                return;
            }
            if (command == "reset")
            {
                //cooling = true;
                are.Set();
                return;
            }
            if (StringUtils.StartsWith(command, "set min"))
            {
                var sub = command.Substring(7);
                sub = sub.Trim();
                mintemp = double.Parse(sub);

            }

            if (StringUtils.StartsWith(command, "set max"))
            {
                var sub = command.Substring(7);
                sub = sub.Trim();
                maxtemp = double.Parse(sub);
            }


        }




        public static bool cooling
        {
            get { return cool.Read(); }
            set
            {
                Reset();
                cool.Write(value);
            }
        }

        public static bool heating { get; set; }

        public static bool can_cool { get; set; }

        public static bool can_heat { get; set; }

        public static bool off { get; set; }

        public static double mintemp { get; set; }

        public static double maxtemp { get; set; }

        public static string status { get; set; }

        public static CircuitPeople.ThermometerWatcher temp_mon { get; set; }
    }
}


And a video :wink:

Trade you a vid of my new device for the new SDK…

Its too bad i pulled it all out on a bread board for now…
Now I have no AC thanks GHI… JK (back to the simple thermostat)

Deal

Alright waiting on you guys…
http://instagr.am/p/K-g668pMnu/

@ Lee Where’s the “play” button? Looks like just a bunch of stuff wired together. I want to see it do something :wink:

no play button it will poll my website for current outside temp and its daily schedule and or overrrides…
no buttons… the last project was basically this same setup to drive the call ac from my unit and well as turn on the fancy little led with the far right the is a ds18b20 hooked up to a rj45 connector so i can pop in my patch board at home and i dont have to run wire every where…

i think it will be pretty slick upgrade from my panda 2, really looking forward the the networking, because the last unit used usb serial and a netbook … so hopefully im streamlining alot…

Personal interest: how do you interface to the HVAC / AC unit? I have a dumb wall mounted controller that I’d love to “automate” and “internet-ify”. All I know is that the control unit was made in Australia by a now defunct company and it’s ~16yrs old so there’s no doco anywhere on it, and I haven’t started deconstructing it …

I control my HVAC in office using infrared.

A good page to check out…
http://www.hometech.com/kb/questions.php?questionid=53
mine is the pretty std home set up…
24VAC Heat/Cool Non-Heat Pump

so i use solid state relays to connect the 24 volt common and “call” for whatever operation it needs…

Hey @ Gus… We gonna have it today???