Main Site Documentation

Problems with the new Getting Started with FEZ spider kit


#1

I was pleased to see the new project posted that could help newbies to get going and have success. It has not worked as expected.

  1. I have updated the firmware in the new spider board.

  2. I typed the program in as indicated without a problem. It looked like things were going my way. i like the way this program is guided through with pictures and screen shots.

  3. I run the depot program and confirm that the spider board is connected and pinged back the correct response.

  4. I run the program without errors and the output screen exactly matches the example. I go to push the button and nothing happens.

  5. I confirm that the hardware is connected correctly and even ys the program gadgeteer screen to confirm it is correct.

  6. Reading trouble shoot stuff maybe the output from the USB is weak so I get a new regulated power supply and adjust the voltage to about 7.8 volts at the power supply and reading about 7.6 at the connector to the interface board.

  7. I run the program again and no change.

  8. The video screen displays:
    EMX
    Version: 4.1.7.0
    LCD: 320x240
    IP: 192.168.1.200
    MAC: 00.1A.F1.00.42.0D
    Managed heap size: 13041664
    Custom heap size: 1048576

  9. This doesn’t change when the bottom is pushed. The LED doesn’t light when the button is pushed. The LED on the push button does light up while the Spider is booting up.

  10. The screen does blink and a line appears then disappears while the program seems to be downloading, but the startup screen information does return.

  11. i have swapped out the push button with no change.

Do I have a defective piece of hardware?

This seems like it should have been a simple thing to get a feeling that the stuff works.


#2

Hi,
Make sure you are connecting the Button Module to the Correct Socket you have in assigned in the designer… that can be easily over looked …

they must match… the sockets have numbers next to them so while the Spider is unplugged connect you socket using the VS2010 designer. then connect the button module to the same port number you see in the designer>> plug the usb cable and run your application…

if it doesn’t work…

please post the code you are using. to call this button.

thank you.


#3

On Dec 2, 2011, at 12:06 PM, TinyCLR.com Forum wrote:

I have checked this many times. I even connected both buttons one on 4 and one on 8 just in case. I confirmed by looking at the program generated .cs that it shows the button is assigned to socket 4. I have spent about 2 days double checking myself before I have asked for help.


#4

here is the code:

using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;

using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace GadgeteerCamera
{
public partial class Program
{
void ProgramStarted()
{
/******************************************************************************************
Access modules defined in the designer by typing their name:

        e.g.  button
              camera1

        Initialize event handlers here.
        e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed);             
        ***************************************************************************************** */

        // Do one-time tasks here

        button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);
        camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured);

        Debug.Print("Program Started");
    }
    void camera_PictureCaptured(Camera sender, GT.Picture picture)
    {
        display.SimpleGraphics.DisplayImage(picture, 5, 5);
    }
    void button_ButtonPressed(Button sender, Button.ButtonState state)
    {
        camera.TakePicture();

    }
}

}


#5

here is the program generated cs:
//------------------------------------------------------------------------------
//
// This code was generated by the Gadgeteer Designer.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------

using Gadgeteer;
using GTM = Gadgeteer.Modules;

namespace GadgeteerCamera
{
public partial class Program : Gadgeteer.Program
{
// GTM.Module defintions
Gadgeteer.Modules.GHIElectronics.Camera camera;
Gadgeteer.Modules.GHIElectronics.Button button;
Gadgeteer.Modules.GHIElectronics.Display_T35 display;
Gadgeteer.Modules.GHIElectronics.UsbClientDP usbClient;

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

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

    private void InitializeModules()
    {   
		// Initialize GTM.Modules and event handlers here.		
		usbClient = new GTM.GHIElectronics.UsbClientDP(1);
	
		camera = new GTM.GHIElectronics.Camera(3);
	
		button = new GTM.GHIElectronics.Button(4);
	
		display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);

    }
}

}


#6

BTW please use Code tags for your code…

How about you remove the camera for now:

and put this in the button pressed event.


void button_ButtonPressed(Button sender, Button.ButtonState state)
{
//camera.TakePicture();
Debug.Print("Pressed");

              display.SimpleGraphics.DisplayText("Button Pressed", Resources.GetFont(Resources.FontResources.small), GT.Color.White, 10, (uint)(20 + (1 * 40)));
}

the code above should print n the debugger window of VS and your display…

let us know if that works…

Jay.


#7

I brought my spare Spider into work last week to show one of our other devs what it was all about - pictures just don’t really convey the coolness… I wrote up the standard 1st project with the camera/button/screen and found that the button didn’t work very well - had to poke it a few times before it would work.

Curtis, have you tried giving the button a bunch of pushes to see what happens? You don’t need to stand on it or abuse it in any way - just give it more than a push or two.

Wasn’t there an early issue with button modules not always triggering? I thought that was fixed but know I had some issue with buttons just last week, with all the latest versions.

Also, at least if you’re just starting, I totally second what Jay Jay mentions above and stuff a Debug.Print at the top of each event handler so you can see what’s going on.


#8

Jay and ddurant thanks for the advice. Yes I have tried pressing the button and holding it and wiggling it, actually both of them i have. Jay, I understand the Code tags but I just put this program in as listed and wanted to get to some success. i have not had any after messing around with this stuff for a few weeks. This is my first into this software and hardware but not my first doing things like this. i have some of my work on Mars and flying around in the B2 bomber. i has intriqued how much is available to work with without all of the hardware development.

Should the screen keep displaying the start up text?


#9

when I put the code in for Jay jay has recommended about checking the button I get all sorts of error codes like Color.White is a field but is used like a type


#10

Does anyone know which leads from the button on the board should be for the NC or NO functions. i can check with a meter


#11

Hi Curtis,
i think i confused you …
the Code tag i was talking about, is when you post Source Code in the Forum so please wrap your source using the FORUMS Code tag… see attached picture…

can you please try the Joystick Module instead of the button ? which acts exactly like a button… and see if that works.

@ Curtis.
Should the screen keep displaying the start up text?

YES until you write something to the screen using the Display.SimpleGraphics i wrote above for example.


#12

Jay,
do I just replace the hardware ie joystick for button or should i change the code to reflect the hardware? Thanks for the advice about the code tag.


#13

I just swapped out the push button for the joy stick and now I run it and I get the following message:
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
Camera ERROR : Unable to take picture. The camera is already busy taking a picture.
I pressed it four times!


#14

Jay here is the code tagged:


using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;

using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace GadgeteerCamera
{
    public partial class Program
    {
        void ProgramStarted()
        {
            /******************************************************************************************
            Access modules defined in the designer by typing their name:                            
            
            e.g.  button
                  camera1

            Initialize event handlers here.
            e.g. button.ButtonPressed += new GTM.MSR.Button.ButtonEventHandler(button_ButtonPressed);             
            ***************************************************************************************** */

            // Do one-time tasks here

            button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);
            camera.PictureCaptured += new Camera.PictureCapturedEventHandler(camera_PictureCaptured);

            Debug.Print("Program Started");
        }
        void camera_PictureCaptured(Camera sender, GT.Picture picture)
        {
            display.SimpleGraphics.DisplayImage(picture, 5, 5);
        }
        void button_ButtonPressed(Button sender, Button.ButtonState state)
        {
            camera.TakePicture();

        }
    }
}