Posts

Showing posts from April, 2015

C# IOIO and I2C devices

Image
The IOIO C# library on GitHub now has basic I2C support.  Protocol support and resource management is lifted from the Java library.  The upper API is message based rather than object based. TWI/I2C/SPI is managed via outbound messages. Data from I2C devices and message acknowledgements from the IOIO come back asynchronously via inbound Messages. Hardware This was tested with an IOIO V1, Bluetooth module, a  JeeLabs Expander Plug  and an old Computer power LED.   I2C device The Expander Plug is based on the  MicroChip MCP23008  port expander.  Programming examples are available on the Jee Labs web site. The Microchip web site has the chip programming guide. The LED assembly already had a current limiting resistor. I just plugged it in across the "+" pin on the expansion port and the port pin next to the power pin. The port expander default address is 0x20.  It has 10 registers that control behavior and transfer data. JeeLabs makes a bunch of 3.3v I2C devic

Sometimes your first impressions are correct

Sometimes you run across interesting outfits when interviewing or working with other organizations. You know you should slide away from an opportunity when... You think in the interview: "If these guys were an airline..." "The countryside would be littered with flaming wreckage." An interviewer describes their new approach and conversation goes something like: Interviewer : We're moving more of our software development off shore. You : That doesn't improve success rate if you don't change the way you do other things. Interviewer : Yes, but our failures will cost less They may not be as Agile as they think they are when They describe their agile SCRUM process: "They have one 3 month sprint per release" "They made the managers the SCRUM managers since they assign work anyway"  It may not be the technical opportunity they described... The senior architect interview includes: Writing Tower of Hanoi pseudo code in

Controlling a Servo attached to an IOIO from Windows WPF application

Image
The IOIO C# library on GitHub now includes a very basic Windows WPF application that lets you control a Servo with your mouse. The program assumes your IOIO is attached to your PC via Bluetooth and that you have a servo on Pin 3. Run the program from inside Visual Studio. Step through the disconnect exception if you run this with debugging enabled.

Backup the drivers when installing Windows 10 on a Winbook TW100

Yes, you can install Windows 10 on a Winbook TW100 or other BayTrail tablet.  There are postings on the Microcenter support web site where folks describe how to to this on other WinBook tablets like the tw700. I have only a couple minor things to add. The tablet has a 64 bit processor and a 32 bit BIOS/EFI.  Use the 32 bit Windows 10 ISO available from Microsoft. Windows 10 32 bit ISOs became available in January 2015. It only has 2GB of memory so a 32 bit OS is fine. I installed the enterprise version.  The standard version didn't work for me but it was probably pilot error Build a restore medea or backup the TW100 driver directory using one of the available tools. It would be best to build a restore media instead of backing up the drivers. This would let you go back to Windows 8.  I was unable to do this with any of my flash drives. I instead used a tool off of sourceforge to back up the drivers. I now Windows 10+ forever. Make a copy of TouchSettings.gt in C:\Windows\inf.  

Message Routing using Double Dispatch with C#

Image
This post describes message routing inside an application. It does not describe message routing across message brokers or across systems. Message driven, or push based notification, systems stream Messages from message sources to interested parties ( Observers) .  There are often multiple message types  routed to multiple observers.  Message types are represented in code as Message interfaces/classes. Message Observers are often interested in some subset of the messages and implement some type of interface or registration scheme that tells the message routing module which message types they are interested in. Scenarios One use case for this is a User Interface that streams UI events (M essages ) from various components to event handlers (O bservers ).  The message sources create messages specific to that event type. The event handlers may receive and process messages of one or more types. Another use case might be some type of IoT device like an IOIO that creates events at sc