Help me, please

Hello I’m communicating with you, because I have a problem with my netduino1 , by uploading the code of grand prix track timer, what happens is that when I go to the final part this appears:

Welcome to the forums!

Can you show us your code?

@ MRTFEREN - The code is very long, and does not allow post it here, but it is at this link: http://gprt.codeplex.com/SourceControl/latest#GrandPrix_Timer/GrandPrix_Timer/Program.cs

hi there adeelpr, welcome to the GHI forums. While I am sure we will be able to assist you, you do realise that this isn’t the best forums for Netduino, right ? Secret Labs have their own forums that can probably equally help you.

So I haven’t dug through teh code, but can you perhaps explain what you think is going wrong here that you’d like help with ? Can you also tell us what experience you have with the Netduino and netmf in general, are you a novice user ? How many other example programs have you used to test our your Netduino before this one ?

@ Brett - Hello , I have tried to communicate with labs secrets , but do not respond

I use the visual studio 2010, if I am a novice user

so can you help us understand what isn’t working ? As far as I can see, in that code there are certain code paths that I would expect to print FALSE on the debug window.

The first steps we’d normally suggest to people are to start simple, and not try to jump right in with someone else’s (pretty long and complex) code. There’s many things we can help out on if you want to start telling us some things you’ve done and things you would like to do in the short term (but that isn’t likely to be to unravel someone else’s code)

Out of interest, do you have the Nokia 5110 display that this example uses, as well as any of the other parts it might need ? Does your display work and print any information ?

@ Brett - No, I will not use the Nokia screen . for now talk to the owner about the code and told me he not had trouble for modify

I don’t think the code has a problem, but I suspect you’re just not familiar enough with the process of debugging applications within VS. I really think everything is running as per normal here and you just need to dig into the code to see how you’re expected to interact with it - the Nokia screen is meant to be a key part of the interaction, but you can change most of those to Debug.Print statements.

@ adeelpr

Can you ping the neduino with MFDeploy?

Can you check if the Firmeware and the Microframework Versions match?

Any help for MFDeploy:

The device didn’t report a version mismatch on deployment and the code is running in the screenshot in the first post, so I don’t think any of this is relevant right now. What I would like to understand next is what is not working, what is the actual symptom that @ Adeelpr is seeing that is believed to be a problem.

Uuups. Sorry it is better to read the hole text. :wall:

I have looked in the code.

For my understanding, the program starts …

initialize a lot.

comes to the Reset function.
set the timerOn Property to false.


 static bool timerOn
        {
            get { return _timerOn; }
            set { 
                _timerOn = value;
                Debug.Print(value.ToString());
                .......

The Debug.Print write False in the Output Window.
Then the program waits…

What should be the next step?

I missing a start condition. Button pressed event or anything else or i have trouble understanding the code.
???


//setup GPIO ports
        static InterruptPort Lane_1 = new InterruptPort(Pins.GPIO_PIN_A0, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_2 = new InterruptPort(Pins.GPIO_PIN_A1, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_3 = new InterruptPort(Pins.GPIO_PIN_A2, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_4 = new InterruptPort(Pins.GPIO_PIN_A3, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_5 = new InterruptPort(Pins.GPIO_PIN_A4, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_6 = new InterruptPort(Pins.GPIO_PIN_A5, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_7 = new InterruptPort(Pins.GPIO_PIN_D6, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort Lane_8 = new InterruptPort(Pins.GPIO_PIN_D5, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);
        static InterruptPort StartGate = new InterruptPort(Pins.GPIO_PIN_D4, true, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth);
        static OutputPort LED = new OutputPort(Pins.ONBOARD_LED, false);

        //static InterruptPort Onboard_SW = new InterruptPort(Pins.ONBOARD_SW1, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLow);
        
        //debug version - uncomment D9 for external switch
        static InputPort Button = new InputPort(Pins.ONBOARD_SW1, false, Port.ResistorMode.Disabled);


There are several interrupt ports so it’s waiting for that, yes.

Again, I suspect there’s no problem here, the code is doing what it is meant to do. We really need to understand what the OP thinks isn’t working, because there’s a good chance it is working exactly as expected. I don’t think you should read into anything more than that and we’ll eventually see what we need to help next on once we hear back from @ adeelpr

Hello, still do not understand, what can be

sorry, I don’t understand either.

This is someone else’s code, that needs specific hardware connections. Do you have those specific hardware connections set up the way the code requires them to be? If you aren’t sure what those connections are (by reading the code) and you can’t match them to your hardware then this is not the example program you should use to learn by. It is far too complex to use as an early project, and you should start simple by following a much simpler project.

So to help us get you started, can you please tell us a bit about your programming expertise, how familiar you are with hardware, what hardware you have (and not just your netmf stuff, things like breadboards, switches, LEDs, etc). We can then start to guide you through some discovery and start your journey.

Here some photos: go led emitter and detector, a ftdi to control the timer through a software.

What I intend to do with this is to take the time of each cart

Here a little more information [quote][b]https://drive.google.com/file/d/0B2-51uvfQ1UubHRCd2xjQmx5MzQ/view?usp=sharing[/b][/quote] I appreciate if you can help me.

ok, so what doesn’t work ?

Since you have all the code, and apparently the hardware, break it down into individual test applications.

Figure out if you can make the start timer trigger.

Figure out if you can make the photodiodes work.

Figure out if you can make the servo move.

Figure out if not having the display will cause the code a problem.