Netduino home hardware projects downloads community

Jump to content


Photo

Netduino Emulator


  • Please log in to reply
24 replies to this topic

#1 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 27 August 2010 - 09:13 AM

Hi all,

I'm a big fan of Netduino and do see it as the future for all PIC programmers out there. I currently work at Manchester Metropolitan University (MMU) we teach our students c# and one of the Hardest things for many is to shift to a different language for real world applications. Netduino now offers an affordable way for us to demonstrate this to them and I'm looking forward to pitching this idea for next years syllabus. Know it has been discussed before about a better Emulator than that supplied by Microsoft more tailored to Netduino users. With thanks to hwiguna who first pointed me of in the right direction (www.youtube.com/watch?v=lp3Ts2OeLjs&feature=related) of the code required.

I've taken this a little further and wish to create something a little more advanced. The file I've attached currently allows the Cpu.Pin.GPIO_Pin0 pin to be set as an input or output and when run as the emulator if you click on the button "Load Input/Outputs" it will either produce a push button switch (input) or a LED (output) this can be used much in the same way as the onboard switch and LED however there outputs. I still have to work on setting up the Analogue inputs/outputs.

(Note: The reason we configure the pins after the emulator has loaded is due to the main program being loaded after the emulator is loaded. So when the emulator is loaded it has no idea about the state of the pins)

I'm hoping by the end of today to have all the digital inputs set up like this and I'll upload this later. What I'm after is anyone who has c# knowledge as XML is not needed, I have none :s, to collaborate this project with. This emulator is open source and there will never be a license allowed for it ideally if we can get this up to scratch it will make the Netduino very user friendly especially for beginners.

Try running a few of the examples in NetduinoApplication by commenting out the current one and un-commenting another I've also attached a screen Shot of the emulator if anyone fancies a peak just Note that the button and LED only appear when appropriate input/output is selected.


Current Targets:

Produce a new set up for pins allowing the user to select

Inputs:
toggle switch
push button switch
Pots (Analogue)
Serial Comms
Outputs:
LED's
Graphical Display (Especially Useful for Analogue and PWM)
Serial Comms
Motor Control

While this seems like a lot if we split the work it shouldn't take to long much of the works has been done by Onir (http://netduinoemulator.codeplex.com/) who with great thanks has made it easy for me to get access to data from the pins.

I'll try and get a video up when it's complete but if anyone wants to supply one please do as I have don't have the software for it yet!

Many Thanks for Reading
Chris


Please note the update version 1.24 is available in a post lower down or
http://netduinoemula...wnloadId=147473

Attached Files


Edited by c_johnson, 02 September 2010 - 10:29 AM.


#2 José Ángel

José Ángel

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts
  • LocationSpain

Posted 27 August 2010 - 11:10 AM

Hi! hwiguna and me are working on it, if you are interested in developing the emulator, I can add you to the Codeplex Project as a developer. This way, you can use the Team Foundation repository to upload and share the code and work all together. Regards!

#3 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 27 August 2010 - 11:20 AM

Hi!

hwiguna and me are working on it, if you are interested in developing the emulator, I can add you to the Codeplex Project as a developer. This way, you can use the Team Foundation repository to upload and share the code and work all together.

Regards!


Hi,

I've PM you on Codeplex and look forward to working with you

Cheers
Chris

#4 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 27 August 2010 - 11:53 AM

Hi,

As promised here is the updated Emulator were inputs and outputs can be set and a button or LED is shown respectively. I hope you find this useful is some way I'll try and keep this up to date but I'll have to get on with proper work now :s. Before there's an update I'll be cleaning the code up and moving it into it's own class so that more input and output options can be applied. Once I have the graph plots sorted I'll start to sort out the analogue inputs and outputs.

There is the small issue that you have to press the button first to get the edge applied as this is not done automatically and all outputs are initially set to false but if the on/off function is automatic this will not be visible.

Take Care
Chris

Please try the current version V1.24
http://netduinoemula...wnloadId=147473

Attached Files



#5 Steven Behnke

Steven Behnke

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts
  • LocationLas Vegas, NV

Posted 27 August 2010 - 02:48 PM

Maybe you could use this for plotting? http://netcontrols.org/nplot/wiki/

#6 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 27 August 2010 - 03:57 PM

Maybe you could use this for plotting? http://netcontrols.org/nplot/wiki/


Hi thanks for the suggestion I was looking at this or ZedGraph (http://zedgraph.org/...title=Main_Page) for plotting I have just come across an alternative (http://www.codeproje...phPlotting.aspx) which might be worth a look. But using a pre-built library will definitely be a way forward.

By the looks of it I should have a decent emulator up and ready with a couple of weeks depending on work. The buttons are complete and I'm half way to shifting the input and outputs into their own classes to allow more advanced configuration and the easy choice of different inputs and outputs.

cheers
Chris

#7 Websteria

Websteria

    Member

  • Members
  • PipPip
  • 25 posts

Posted 27 August 2010 - 05:30 PM

Hi thanks for the suggestion I was looking at this or ZedGraph (http://zedgraph.org/...title=Main_Page) for plotting I have just come across an alternative (http://www.codeproje...phPlotting.aspx) which might be worth a look. But using a pre-built library will definitely be a way forward.

By the looks of it I should have a decent emulator up and ready with a couple of weeks depending on work. The buttons are complete and I'm half way to shifting the input and outputs into their own classes to allow more advanced configuration and the easy choice of different inputs and outputs.

cheers
Chris


This is really awesome! The only thing I would add would be a time constant so that things which switch on and off very quickly are visible. Allow a thread.sleep time to be passed in or something. I had to modify my code to see it work, but it did work right off the bat. Very neat!

#8 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 28 August 2010 - 10:01 AM

This is really awesome! The only thing I would add would be a time constant so that things which switch on and off very quickly are visible. Allow a thread.sleep time to be passed in or something. I had to modify my code to see it work, but it did work right off the bat. Very neat!


Hi,

Thanks for the suggestion I will look into it but this may cause conflict issues with access as the code your simulating will not be running in a the same speed as the emulator. Ideally with the graph output we would be able to see faster changes by adjusting the plotting time period much as you would with an oscilloscope but we will have to examine that later.

As for the current work moving inputs and outputs into a class has thrown up a problem as

D0.OnGpioActivity += new GpioActivity(D0_OnGpioActivity);

can not be correctly set up allowing for the changes on the form itself I'm sure I'll find the solution

Take Care
Chris

#9 Chris Mancini

Chris Mancini

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationMassachusetts

Posted 28 August 2010 - 12:28 PM

As for the current work moving inputs and outputs into a class has thrown up a problem as

D0.OnGpioActivity += new GpioActivity(D0_OnGpioActivity);

can not be correctly set up allowing for the changes on the form itself I'm sure I'll find the solution


I may be able to help...Could you provide more information as to what it is you are trying to achieve?

#10 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 28 August 2010 - 12:43 PM

I may be able to help...Could you provide more information as to what it is you are trying to achieve?


Hi thanks for the offer manged to solve the problem it's pretty simple I've just never had to do it it before. It's simply a matter of accessing the forms control from a class. I've still gota test it so I'll PM you if the problem consists.

If all goes well I'll try to release the next version early next week which will allow the inputs to be configured to different styles of buttons. If I get Monday to myself I'll try and implement the graphical output at the moment I'm considering a seperate form which can display all the outputs as graphs just got to sort out the layout.

Take Care
Chris

#11 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 28 August 2010 - 11:52 PM

Hi, I just saw this post. That's pretty neat how you look at the status of the port as setup by the user and make emulator automatically display the correct UI. I've been brainstorming about how to support more than just switches and LEDs. At least, I'd like to emulate potentiometers, Voltmeters, and servos. I will share soon.

#12 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 31 August 2010 - 08:20 AM

Hi everyone, Looks like their will be a small delay on the next release I had to export the project to vista for the weekend and I'm having problems in what I thought was migrating the inputs and outputs to their own class but was in fact a failure to work at all. Chris Mancini I'll be taking you up on your offer for help sorry I've not updated over the weekend but I was stuck using mobile internet and it really doesn't like this site :s. In the meantime many thanks to José Ángel for adding me to the Codeplex project and I'll upload the updates their as well. Take Care Chris

#13 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 31 August 2010 - 01:54 PM

Hi everyone

Well that took less longer than expected. Here is Version 1.23 (Beta) It currently has a configuration window with more options than available at the moment but hopefully they will be coming soon. There is still the small bug of you having to press a button once before it is set to the correct state of what you would expect thus Beta as I'm going to try and get rid of this later on today.

Once this is done I'll be looking into the use of a graph. Mainly to see how we can display this on form if not possible in another form to prevent the interface from become cluttered and undesirable. Hope you like this new release. It's being hosted on the codeplex website now because I've used up the amount I can upload to this forum (that took me long :))

Updated Version Available
V 1.24
http://netduinoemula...wnloadId=147473

V.1.23 Beta
http://netduinoemula...wnloadId=146972

Take Care
Chris

#14 c_johnson

c_johnson

    Member

  • Members
  • PipPip
  • 11 posts

Posted 02 September 2010 - 11:41 AM

Hi everyone

I've added a DC motor as an output a little easier than servos at the moment. Just because it was easy and a quick thing to do please check out the Codeplex page if you want to contribute.

Set Inputs D0 to D6 as toggle switch you can use push buttons but I prefer testing them all. Set Outputs D7 - D13 as DC motors. Hit all the switches once till there blue (still got the same bug of setting them going straight away got a feeling this has to do with a flag or something I'm using) Then hit them all again and watch the motors spin Not very fast but hey it's a start.

V 1.24
http://netduinoemula...wnloadId=147473

Cheers
Chris

#15 Gregory Pilar

Gregory Pilar

    New Member

  • Members
  • Pip
  • 4 posts

Posted 29 May 2011 - 06:11 AM

Hi! , where can i find the emulator? , the donwload link donts work..

#16 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 29 May 2011 - 07:13 AM

Hi! , where can i find the emulator? , the donwload link donts work..

Welcome to the community.

The main site for the project lookds to be netduinoemulator.codeplex.com. There is nothing in the download section but you can still find source code there. The last check in looks to be October 2010.

Does anyone know if this project is still on going?

Regards,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#17 Chris Mancini

Chris Mancini

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationMassachusetts

Posted 29 May 2011 - 02:37 PM

Does anyone know if this project is still on going?


We recently began talking again. There is some work remaining. We are currently trying to organize ourselves and understand our skills as a team and revisit the emulator. Check out the discussions to see what is going on.

#18 Gregory Pilar

Gregory Pilar

    New Member

  • Members
  • Pip
  • 4 posts

Posted 02 June 2011 - 08:50 PM

Welcome to the community.

The main site for the project lookds to be netduinoemulator.codeplex.com. There is nothing in the download section but you can still find source code there. The last check in looks to be October 2010.

Does anyone know if this project is still on going?

Regards,
Mark


Thks!!

#19 xikky

xikky

    Member

  • Members
  • PipPip
  • 20 posts

Posted 20 February 2012 - 10:09 AM

hello netduino community! I find this emulator very interested, but link to download the code from CodePlex doesn't work. It tells me that the file might be deleted. Anyone can direct me for the latest update of this emulator?

#20 habakuk

habakuk

    New Member

  • Members
  • Pip
  • 8 posts

Posted 31 August 2012 - 01:39 PM

The codeplex site is gone...; what is the alternative to emulate the Netduino?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.