This week I revisited parts of the ECA backend since Li was designing the UI for it. There were several small changes that needed to be done to make for better interaction between the two which mostly concerned what data the API provided. I also made methods for changing events, conditions and actions.
There was continued discussion about how clear the ECA system is. Currently it is not that clear to some people who have looked at the code what the difference is between an event and a condition. In addition to this we are all in agreement that our current way of handling the scope of a rule (eg. Is it per item/room/house?) is not good. Unfortunately, we can’t think of a better way to do it so it will have to stay as it is for now. It’s definitely something I’d like to come back to in the future if we have enough time though but it works for now so it’s better to move on to new features.
Over the weekend I also struggled once again with the Gadgeteer networking. In our proof of concept we were able to use the Ethernet module which you can read about in my posts lower down the page. To fit in with our “proper” design we clearly need to use the WiFi module though.
I tried to adapt the code example that I previously used for the wired connection (http://www.tinyclr.com/codeshare/entry/588) but without much luck. Initially I struggled for what to use in the constructor for WiFiRS9110. Eventually I found a comment somewhere in example code which included:
WiFi.Enable(WiFi.HardwareModule.RS9110_N_11_21_1_Compatible, SPI.SPI_module.SPI2, (Cpu.Pin)10, (Cpu.Pin)18, (Cpu.Pin)20);// FEZ Spider Socket 6
This was the closest thing I could find so I tried using this but without much luck. I also found in the 4.2 release notes that there are WiFi problems as a known issue so I have to wonder if this is perhaps part of the problem.
I’ll be giving the WiFi a fresh attempt next week when I’ll be able to get help in the lab sessions.