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.

Bendage's Content

There have been 149 items by Bendage (Search limited from 30-March 23)


By content type

See this member's


Sort by                Order  

#42314 NeonMika.Webserver

Posted by Bendage on 27 December 2012 - 11:15 PM in Project Showcase

Here is another non trivial fix. There are two threads fighting to flash the onboard LED.

 

In the static main remove the entire while loop with Thread.Sleep(Timeout.Infinite)




#42310 Plus 2 Pins compatiability different or defective board?

Posted by Bendage on 27 December 2012 - 11:03 PM in Netduino Plus 2 (and Netduino Plus 1)

LOL! Thanks




#42309 NeonMika.Webserver

Posted by Bendage on 27 December 2012 - 11:02 PM in Project Showcase

Chris,
FYI I had the same mercer problem explained here Blue screen.
I first suspected was my pc, but I tried at least 5 times and had always the same result using this web server project. After reflashing the board, I tested may other
project with no problem, as soon as I start this web server everything hangs.
Moreover, trying to detach the USB cable during VS hang, blue screen appears, while terminating VS first and then detach the board no blue screen appear, and I only have to
reflash the board.

Hope this could help you
Gerardo

Hey Gerardo,

 

Never unplug the USB cable while VS is deploying. The BSOD is sure to follow. There is an option to cancel deployment under View/Toolbars/Build

 

Always use this and DO NOT unplug the board. I realize this does not fix the issue that the 3 of us cannot reproduce but there is definitely an issue I can vouch for. Since I just got my N+2 today it will take me a bit of time to figure out whats going on.




#42308 NeonMika.Webserver

Posted by Bendage on 27 December 2012 - 10:56 PM in Project Showcase

Chris, it's difficult to share the code, because VS hangs, the board hangs, the result in th debug window exactly the same of Mercer one. I'm using N2+ with 4.2.1.2 Today i was testing even the netmftoolbox-20443 basic speaker sample, and i had the same result: VS and the board hang. VS must be terminated, and the board must be reflashed. Thank you, and I want to thank you for N2+, absolutely a great project! Gerardo

 

I had the same problem. Flashed my board twice! Daves build works plus the bug fix I posted. Runs fine.




#42305 NeonMika.Webserver

Posted by Bendage on 27 December 2012 - 10:51 PM in Project Showcase

Ok, I have successfully got this running on N+2 but there is a bug in the socket code that causes the web server to drop the client about 3 out of 5 requests.Here is where the bug is under the server.cs...

 

The problem is that when the socket connects there are not bytes yet in the buffer. If the byte count is 0 he breaks out which causes the client browser to receive a dropped connection. This can be fixed by inserting a thread.sleep(100) up a few lines. Once this sleep is placed initially before the first byte check, the buffer has enough time to start populating. I have commented where the thread.sleep needs to be Fix that and this thing purrs.

 

Very nice web server. TONS of functionality.

private void WaitingForRequest( )        {            while ( true )            {                try                {                    using ( Socket clientSocket = _ListeningSocket.Accept( ) )                    {                        // Add the Thread.Sleep(100) Here                         int availableBytes = 0;                        int newAvBytes;                        //if not all incoming bytes were received by the socket                        do                        {                                                       newAvBytes = clientSocket.Available - availableBytes;                            if ( newAvBytes == 0 )                                break;                            availableBytes += newAvBytes;                            newAvBytes = 0;                            Thread.Sleep(1);                        } while ( true );                        if ( availableBytes > 0 )                        {                            byte[] buffer = new byte[availableBytes > Settings.MAX_REQUESTSIZE ? Settings.MAX_REQUESTSIZE : availableBytes];                            byte[] header = new byte[0];                            int readByteCount = clientSocket.Receive(buffer, buffer.Length, SocketFlags.None);                            for ( int headerend = 0; headerend < buffer.Length - 3; headerend++ )                            {                                if ( buffer[headerend] == 'r' && buffer[headerend + 1] == 'n' && buffer[headerend + 2] == 'r' && buffer[headerend + 3] == 'n' )                                {                                    header = new byte[headerend + 4];                                    Array.Copy(buffer, 0, header, 0, headerend + 4);                                    break;                                }                            }                            //reqeust created, checking the response possibilities                            using ( Request tempRequest = new Request(Encoding.UTF8.GetChars(header), clientSocket) )                            {                                Debug.Print("... Client connected ... URL: " + tempRequest.URL + " ... Final byte count: " + availableBytes);                                if ( tempRequest.Method == "POST" )                                {                                    //POST was incoming, it will be saved to SD card at Settings.POST_TEMP_PATH                                    PostToSdWriter post = new PostToSdWriter(tempRequest, buffer, header.Length);                                    post.Receive( );                                }                                //Let's check if we have to take some action or if it is a file-response                                 HandleGETResponses(tempRequest);                            }                            Debug.Print("Client loop finished");                            try                            {                                //Close client, otherwise the browser / client won't work properly                                clientSocket.Close( );                            }                            catch ( Exception ex )                            {                                Debug.Print(ex.ToString( ));                            }                        }                    }                }                catch ( Exception ex )                {                    Debug.Print(ex.Message);                }            }        }



#42290 Plus 2 Pins compatiability different or defective board?

Posted by Bendage on 27 December 2012 - 09:15 PM in Netduino Plus 2 (and Netduino Plus 1)

Well,

 

Dave VanderWekke answered this on another post. Need to use the Hardware.Netduino instead of Hardware.NetduinoPlus.

 

It is called a PLUS 2 ya know. Thats what I get for assuming. Be nice to have read this in the Plus 2 intro post. But at least my problem is solved.

 



#42288 NeonMika.Webserver

Posted by Bendage on 27 December 2012 - 09:13 PM in Project Showcase

See what I get for assuming??? Thus the Netduino PLUS 2...

 

Thanks. No wonder my damn board wasn't functioning right.

 

Saved the day dude!




#42286 NeonMika.Webserver

Posted by Bendage on 27 December 2012 - 09:00 PM in Project Showcase

I've started with a clean version of NeonMika Webserver. I've made the appropriate changes to run on the Netduino Plus 2 and have deployed and tested it on the Netduino Plus 2.

You can download the modified project from this DropBox Link (sorry was too big to post here).

 

Hey Dave,

 

If you remove the 2 unneeded 72mb dat files it will compress to about a meg and a half.

 

Question...

 

Why did you remove references to SecretLabs.NETMF.Hardware.NetduinoPlus and replace with SecretLabs.NETMF.Hardware.Netduino?




#42283 Plus 2 Pins compatiability different or defective board?

Posted by Bendage on 27 December 2012 - 08:22 PM in Netduino Plus 2 (and Netduino Plus 1)

Kind of feeling like a newb here. Just hooked up my Plus 2 today.

 

Running MF 4.2 (QFE2), SDK 4.2.1, and board shows 4.2.1.2 under MFDeploy.

 

Simple On board LED blink test shows no blinking light. First thought was it was burnt out. But it lights up on reset. So i used a diff pin... D5 D6 D7... no blink. Scratching my head here, checked the code against a Plus board... no probs. Hooked up a multimeter to tested pins and no juice.

 

Tested the 3.3v pin and that shows juice.

 

So before I deduct that I have a defective board, one question...

 

The project setup and (standard) pin assignment is a straight shot from a regular plus project right? I mean the app gets deployed... so what gives?

 

Rocket Science code below...

using System;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoPlus;namespace NetduinoPlusApplication1{    public class Program    {        public static void Main()        {            // write your code here            OutputPort led = new OutputPort(Pins.GPIO_PIN_D5, true);            while (true)            {                led.Write(true);                Thread.Sleep(1000);                led.Write(false);                Thread.Sleep(1000);            }        }    }}

 




#37100 Netduino Plus Release vs Debug Issue

Posted by Bendage on 12 October 2012 - 09:29 PM in Netduino Plus 2 (and Netduino Plus 1)

Remove and re-add the assembly???
Who thinks like that????
Hahaha! Thanks Chris

I feel stupid today.

Posted Image



#37097 Netduino Plus Release vs Debug Issue

Posted by Bendage on 12 October 2012 - 08:50 PM in Netduino Plus 2 (and Netduino Plus 1)

Hey everyone,

Probably something I'm overlooking in the 4.2 framework.

trying to compile a binary for release and extract the Hex with MFDeploy. Compiles fine in Debug.

But after switching to release I get this message..

The type or namespace name 'NetduinoPlus' does not exist in the namespace 'SecretLabs.NETMF.Hardware' (are you missing an assembly reference?)

Um.... nope. Looking right at the reference that compiled just fine in debug mode.

What am I missing?

Posted Image



#36598 Netduino Console

Posted by Bendage on 05 October 2012 - 11:48 PM in Project Showcase

And for those of us who are relative novices to netduino and netmf, some basic documentation/tutorial on how to set up the console..install, getting it started, etc.



Hi Don,

Welcome to the Netduino Community.

These posts have got me thinking about the design of this console and I admit from standing out looking in, it looks rather cumbersome. I've been very busy this week adding many new features that will help non-developers use this tool. In fact, my new goal is to modify this so no coding is necessary. Here are some of the new features coming (almost done)...

- The Console now supports typed data parameters... this is good for using components you did not create that will not allow you to put an alpha value where a numeric value is required.

- Any numeric parameter will now be automatically graphed in real time so you can view data exchanged in a nice graphical output and even save that data.

- A toolbox is being designed for you to drag and drop components onto your GUI just like visual studio which will load all default parameters.

- The Netduino Controller wrapper will now be sealed so that you can now use the console without even opening visual studio and any components used will be automatically uploaded to the controller.

Once I am done with these changes I will quickly throw together some useful universal components and a quick video of the final tutorials and then start on documentation.

Thanks for your patience. I promise it will be worth it.



#36522 SD Card Module Update

Posted by Bendage on 04 October 2012 - 02:08 PM in Netduino Go

Fabien, I think I speak for many that would rather preorder the SD and wait another month for a late release than have you refund the money. Can you please put the module back on your site and let us preorder? Because now we have to keep checking back . I know you sent us refunds but I would rather have you hold my money and be first in line rather than miss the release and you be sold out AKA Raspberry Pi. :) Thanks buddy



#36339 Netduino Console

Posted by Bendage on 01 October 2012 - 02:19 AM in Project Showcase

Hi Igor. You're in luck. Everything you need for communications has been wrapped inside the commandlibrary.dll for the desktop and the controllibrary.dll for the controller. Yes, as of right now, serial is the only message factory



#36307 Netduino Console

Posted by Bendage on 30 September 2012 - 06:57 PM in Project Showcase

Haha! Love the feedback. OK I will work on that. Meanwhile (jumped the gun) a video on how to create a component control has been added. http://netduinoconso...cussions/397465



#36283 C# console to NetDuino help?

Posted by Bendage on 30 September 2012 - 07:24 AM in Visual Studio

The first error appears to be coming from your serialPort_DataReceived event. Use this instead... string stringData = objSerialPort.ReadExisting();



#36265 Introducing MicroWorkflow for Netduino

Posted by Bendage on 29 September 2012 - 05:55 PM in Project Showcase

Winforms is going to die.
I know that it's more intuitive, but the initial effort of learning WPF absolutely worth in long terms.
Moreover, the WPF approach is working on all the latest platforms, and much similar to the HTML/web way.

Brian, I think the two tools are complementary: they can cooperate without problems... *AND* ...we're not in a hurry, so that time for thinking about will be enough, I guess.

When you have a prototype, I'll try it, and you'll do the same with mine.
Cheers



The source code has been published this morning. Would you rather have a setup project to play with?



#36263 Netduino Console

Posted by Bendage on 29 September 2012 - 05:50 PM in Project Showcase

Guys, Thank you for your interest in the Netduino Console. I've worked very hard to create a professional environment to test and run visual communication components for the Netduino. First, the Codeplex page has been published and you can now download the source. There are many places I wish to take this. The goal is to get this working with the Netduino Go! and create a control component for each module that comes out. Also a TCP/IP messaging layer is being worked on. As of right now these are the components published with the source Code: - PWM Component Control - Accelerometer Component Control - LED Component Control - Force Pressure Sensor Component Control - Stepper Motor Component Control As you know, the Netduino Plus does not have a ton of memory. Tweaking the controller engine to receive byte streams of over 2048 bytes at a time with each message has been very difficult. Plus, MF 4.2 is very sensitive... throwing all kinds of non-intuitive exceptions. This has been very difficult to track down. But the Console is pretty stable as the video shows. All of the code is mine from the ground up, excluding two controls used in the GUI. A custom panel control and a listview control that allows progress bars. These were taken from the CodeProject website. The messaging layer was designed as a 'message factory' much in the same way we use connection strings to connect to database drivers. This means we can snap in another messaging layer besides serial with little effort. More videos are coming, as I'm sure it may not be intuitive yet on how to start coding your own components. But I assure you it takes very little effort to design your own components and get up and running rather quickly. Unfortunately all of my time has been put into the stability of the engine. Now that this has been complete I can spend more time creating robust components for us as a community. The concept of the Netduino Console is in fact to create a visual way to send and receive events and messages back and forth between your PC and the controller without the headache of the lower layers. My goal is to obviously get people up and running quickly to take advantage of the capabilities this gives you as a developer, AKA professional tinkerer. The interface can indeed be run as a standalone application (sort of) in that the configuration files can be associated with the console.exe and setting can be configured to connect, initialize and start the communication automatically. In other words, double clicking a config file will load the console along with the project, connect to the controller and begin sending and receiving messages without user interaction. I really hope that when you realize what this offers you as a developer, you will become as excited as I have been to get this "puppy" up and running. :) Would love you hear your thoughts on what kind of components you'd like to see. Thanks again for your warm responses. Brian And Mario.... I lika the way you talka too!



#36258 Introducing MicroWorkflow for Netduino

Posted by Bendage on 29 September 2012 - 03:58 PM in Project Showcase

Wow! This is great stuff!!!! You and I have BOTH been busy. I look forward to integrating! I was going to go the WPF route but backed off because a lot of people are more familiar with Win forms. Perhaps this will inspire me to rewrite Netdiuno Console in WPF. Awesome job. Gonna be a busy end of the year.



#36234 Serial Data Transfer Protocol problem

Posted by Bendage on 29 September 2012 - 05:00 AM in Netduino Plus 2 (and Netduino Plus 1)

"universal serial protocol" - that must be what they use on Star Trek to set up comms with alien races the Enterprise computers have never encountered before.

I always wondered how they did that. Commander Bendage to the bridge!



Hey Paul. Just wanted to let you know it's done. Take a look and tell me what you think.

http://forums.netdui...6233#entry36233



#36223 Netduino Console

Posted by Bendage on 29 September 2012 - 01:48 AM in Project Showcase

After a year of development on my free time I'd like to present Netduino Console.

A dynamic plugin interface with a built in messaging layer for you to create control plugins that send and receive events to and from the Netduino Controller.

You can find the source code at https://netduinoconsole.codeplex.com

Linked is a quick demonstration of some of the capabilities of what the Netduino Console can do.

Feedback and questions are welcome.

Enjoy!

http://www.youtube.com/watch?v=nxBPoAudAKA&feature=channel&list=UL

Posted Image



#35655 Getting started with Nwazet Display

Posted by Bendage on 20 September 2012 - 09:15 PM in Netduino Go

Bendage,

I suspect that something went wrong when I recently merged multiple source trees during the release of the DAQ module code, even though I did a regression pass to make sure all projects built, deployed and ran.

-Fabien.



No problem. Looking through your framework, it's very nicely done!

One more stupid question. How to start off by erasing your logo? If I start drawing it draws over it but still shows below it. Is there a ClearScreen() function somewhere?



#35648 Getting started with Nwazet Display

Posted by Bendage on 20 September 2012 - 08:53 PM in Netduino Go

Also, I noticed that your reference to the SDT028ATFTLCDTS.dll shows up in your references as Nwazet.Go.Display but the identity in the library reference properties shows Nwazet.Go.SDT028ATFTLCDTS. But when I ref the same library is shows as Nwazet.Go.SDT028ATFTLCDTS. Why is that?



#35645 Getting started with Nwazet Display

Posted by Bendage on 20 September 2012 - 08:48 PM in Netduino Go

Thanks for the response Fabien. Steps 6-8 are supposed to be mandatory for each project using the display or are you suggesting this a as a 'quick fix' until you solve the .pe deployment dilemma?



#35635 Getting started with Nwazet Display

Posted by Bendage on 20 September 2012 - 07:44 PM in Netduino Go

Whats up everyone,

Finally dusted off my Go. Bought everything months ago but have been so busy with an N+ project its all been sitting in my drawer.

First off, I'd like to say that I am very impressed with the Go and modules being created. Fabien, your nutshell app is genius. Still some bugs in it when trying to change colors of shapes but I can improvise.

I have an issue and a suggestion... issue first.

Downloaded the latest drivers from here ... https://bitbucket.or...f220d46/Library

Created a Go project.

Added Nwazet.Go.SDT028ATFTLCDTS to refs

Made a simple screen canvas via nutshell here...

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.NetduinoGo;
using Nwazet.Go.Display;
using Nwazet.Go.Imaging;
using Nwazet.Go.Fonts;

namespace DisplayTesting
{
    public class Program
    {
        public static void Main()
        {
            // write your code here

            var canvas = new VirtualCanvas(null, null);
            canvas.Initialize(GoSockets.Socket5);
            canvas.SetOrientation(Orientation.Landscape);
            canvas.DrawRectangleRounded(
                11, 33,
                303, 222,
                ColorHelpers.GetRGB24toRGB565(0, 0, 0),
                5,
                RoundedCornerStyle.All);
            canvas.DrawButton(
                245, 190,
                50, 20,
                DejaVuSans9.ID, 12,
                ColorHelpers.GetRGB24toRGB565(233, 114, 114),
                ColorHelpers.GetRGB24toRGB565(255, 255, 255),
                ColorHelpers.GetRGB24toRGB565(0, 0, 0),
                "Button",
                RoundedCornerStyle.None);
            canvas.DrawArrow(
                263, 114, 33,
                DrawingDirection.Right,
                ColorHelpers.GetRGB24toRGB565(172, 220, 102));

            canvas.Execute();

            Thread.Sleep(Timeout.Infinite);

        }

    }
}



When compiling I am receiving the following errors...

Could not copy the file "C:\Users\bbender\Dropbox\Netduino\Development\Netduino Go\DisplayTesting\DisplayTesting\bin\Debug\LE\Nwazet.Go.Core.pe" because it was not found.

Could not copy the file "C:\Users\bbender\Dropbox\Netduino\Development\Netduino Go\DisplayTesting\DisplayTesting\bin\Debug\LE\Nwazet.Go.SDT028ATFTLCDTS.pe" because it was not found.

I tried referencing the Nwazet.Go.SDT028ATFTLCDTS.dll in two areas of Fabien's BitBucket release...

..\fabienroyer-nwazet.go-b24909aff18e\Library\Nwazet.Go.SDT028ATFTLCDTS\Nwazet.Go.SDT028ATFTLCDTS\bin\Debug
..\fabienroyer-nwazet.go-b24909aff18e\Binaries

No Go! for either reference (pun intended)

Please advise.

Here is also my suggestion...

I looked at the Nwazet product page, this forum (maybe not well enough) and the wiki pages... I really don't see any step by step of exactly what to download and what to reference to get this display fired up. I assumed copy/paste of Nutshell code into my startup program.cs and referencing above mentioned dll but I did not read that it is the correct place or to do that at all. I did load the NwazetDisplayModule.sln provided but it's absolute Go Newb overkill, especially since the SD module has not even been released yet and I don't have a breakout SD.

Is there an instruction page a little less to the extent of taking this display to the max... possibly a more step by step? I realize we are all somewhat engineers or professional tinkerers but until I master the Go! like the plus, I and probably many others would like a dumbed down step by step of hooking the display up to the go, referencing minimum required dlls, and running with code from the nutshell. Maybe even a simple button click event example.

Anything like that as of yet?

BTW... I did read this post... http://forums.netdui...h__1#entry30497

Didn't help. From what I 'think' I know about .pe files being included when ref'ing dlls... my impression is the GAC loads them into your bin. I could be wrong. Perhaps an SDK setup for your drivers with an actual version to go by so we know if we have the latest Fabien?




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.