I have look through all those post. I did try them and ended up same issue.
In addition, I use external power DC 9V , 1.3A.
Seeking if anyone know what happen? any suggestion?
"I tried to reproduce the problem with slightly smaller example provided by andre.m’s reference, and could only get the error to occur if the cable carrying the touch info (component J1 socket on circuit board) was not completely seated; this would intermittently cause an error as described.
@ JeffK I had them placed nicely using gadgeteer cable on port 4 of Cobra II as well the “i” port on CP7. I had my program run in gadgeteer.
I removed the cable, placed it back. and still getting the same issue. Any solution you would recommend?
I found out the problem only occur when I use Glide but not when I use WPF.
@ Architect - more like Guru-Wannabee. @ tach0902 (1) how did you find out " the problem only occur when I use Glide but not when I use WPF?" – through experimentation? (2) the cable I’m describing is NOT a gadgeteer cable; rather, it is the smaller of the two ribbon cables attaching the physical display to the CP7 circuit board.
@ JeffK - Yes, I did the experiment. It worked on WPF but not Glide. I wasn’t aware the name of the component you mentioned. Now I found the J1 cable. I just did a quick pull out and have it place it back nicely. It still doesn’t work. same error. What can I do now?
The best would be a minimal example, i.e. start cutting code out, especially the need for the resource file. Then post the minimal example, that way anyone trying to reproduce your error has less variables to deal with.
using System;
using System.Collections;
using System.Threading;
using System.IO;
using System.IO.Ports;
using Microsoft.SPOT;
using Microsoft.SPOT.Touch;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Networking;
using Gadgeteer.Modules.GHIElectronics;
using Gadgeteer.Interfaces;
using GHIElectronics.NETMF.Glide;
using GHIElectronics.NETMF.Glide.Display;
using GHIElectronics.NETMF.Glide.UI;
namespace GlideButtonDemo
{
public partial class Program
{
private static GHIElectronics.NETMF.Glide.Display.Window window;
private static TextBlock textblock;
private static Button button;
void ProgramStarted()
{
// Do one-time tasks here
Debug.Print("Program Started");
// Resize any loaded Window to the LCD's size.
Glide.FitToScreen = true;
// Load the Window XML string.
window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.Window1));
GlideTouch.Initialize();
InitWin();
// Assign the Window to MainWindow; rendering it to the LCD.
Glide.MainWindow = window;
}
private static void InitWin()
{
textblock = (TextBlock)window.GetChildByName("instance2754");
textblock.TapEvent += textblock_TapEvent;
button = (Button)window.GetChildByName("buttonRed");
button.TapEvent += buttonRed_TapEvent;
}
static void textblock_TapEvent(object sender)
{
textblock.Text = "YES";
textblock.Invalidate();
}
static void buttonRed_TapEvent(object sender)
{
Mainboard.SetDebugLED(true);
//Debug.Print("yes3");//led.TurnRed();
}
I have simplified the code and the results is still “failed to perform I2C transaction”.
Anyone has the idea what is wrong? and could anyone has the same board give a try? I want to know if it’s the hardware issue or software coding error?
Thanks!
You can always take a look at the sample SimpleWPF application that ships with NETMF under “Documents\Microsoft .NET Micro Framework 4.2\Samples\SimpleWPFApplication”