Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

The3dman

Member Since 19 Sep 2012
Offline Last Active May 18 2013 12:27 AM
-----

Topics I've Started

Grove OLED Display 128*64 on Netduino Plus

11 October 2012 - 08:39 AM

Hi all, I'm having some problems to use the lcd display "Grove - OLED Display 128*64" (http://www.seeedstud..._Display_128*64). It uses a I2C bus with address "0x3c". I wrote this code to power on it: namespace i2cExample { public class Program { public static void Main() { Debug.Print("Start..."); byte address = 0x3c; seed_Display myDisplay = new seed_Display(address); myDisplay.init(); Thread.Sleep(Timeout.Infinite); } } public class seed_Display { byte SeeedOLED_Display_Off_Cmd = 0xAE; byte SeeedOLED_Display_On_Cmd = 0xAF; byte SeeedOLED_Normal_Display_Cmd = 0xA6; byte SeeedOLED_Inverse_Display_Cmd = 0xA7; I2CDevice.Configuration config; I2CDevice device; int transactionTimeout = 100; // timeout in ms public seed_Display(byte address) { config = new I2CDevice.Configuration( address, //address 100 //clockrate in KHz ); device = new I2CDevice(config); } public void init() { sendCommand(SeeedOLED_Display_Off_Cmd); //display off // Thread.Sleep(1); sendCommand(SeeedOLED_Display_On_Cmd); //display on //Thread.Sleep(1); sendCommand(SeeedOLED_Normal_Display_Cmd); //Set Normal Display (default) // Thread.Sleep(1); sendCommand(SeeedOLED_Inverse_Display_Cmd); //Set inverse brightness } public void sendCommand(byte Command) { byte[] command = new byte[] { Command }; I2CDevice.I2CWriteTransaction writeTransaction = I2CDevice.CreateWriteTransaction(command); //execute transaction I2CDevice.I2CTransaction[] transactions = new I2CDevice.I2CTransaction[] { writeTransaction}; int transferred = 0; transferred = device.Execute(transactions, this.transactionTimeout //timeout in ms ); if (transferred != 1) { Debug.Print("sendCommand, transferred: " + transferred + " command: " + Command); //throw new Exception("Could not write to device"); } } } } After I run this code, nothing happened. I expected the display to power on and then to invert brightness. At least I was expecting some sign... So I ran a test with a logic analyzer (Ikalogic-2). I made a test running the analyzer at 10 MHZ. The results (in attachment) are positive, it seems that the display is responding correctly to the commands that I send. Then where is the problem? I can't see it, I can only immagine that the screen is damage so far. I tried also: - to change the address and in that case there was no ack. - to use a clock rate of 10khz instead of 100khz, non change - to put a pause between commands, nothing

Compiling and deploying a release code

04 October 2012 - 07:57 AM

Hi all, After a long debug (with tens of Debug.Print) of my simple web client application, now It seems to work :). So I want to deploy a release code on my netduino plus. In in the Properties window, 1) I set: - Configuration: release under .NET Micro Framework tab - Configuration: release under Debug tab - Configuration: release under Build tab - Output path: \bin\Release under Build tab 2) then I open the Configuration manager from the solution Explorer and from the project list I set my project's configuration as Release 3) Now I can run build solution and deploy directly from the Solution Explorer Is this the correct way to do that? Are there other settings I should care of? Thanks, Andrea

Ethernet device fail to connect

03 October 2012 - 05:41 PM

Hi all, I'm having some problems in using the ethernet connection with my netduino plus. I'm running a simple http client that send some informations to a web server. If a power up my netduino with the ethernet cable connected, then everything works. I can also unplug the cable and plug again it after a while withouot problems. If a power up my netduino without the cable and then I connect it after a while, nothing works. I think that it could be a problem with dhcp or with the firmware. I'm using 4.2.0 firmware Andrea.

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.