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.

logicalstep's Content

There have been 21 items by logicalstep (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#39768 HT1632 interface (alpha)

Posted by logicalstep on 20 November 2012 - 10:35 PM in Netduino 2 (and Netduino 1)

Hi Hauk, Thanks for your help with this...I've just managed to get it to run in debug...just need to connect it up and test now! I'll post back either way. Thanks for your help so far. Logicalstep



#39766 HT1632 interface (alpha)

Posted by logicalstep on 20 November 2012 - 10:10 PM in Netduino 2 (and Netduino 1)

Just tried it on my Plus 2 as well and get the same thing...very confused. Logicalstep



#39759 HT1632 interface (alpha)

Posted by logicalstep on 20 November 2012 - 08:35 PM in Netduino 2 (and Netduino 1)

Hi,
it should work fine, that's what I did, but I don't remember which version I used, I think I had to use a beta-version to get access to the variable SPI-functions.

/Hakan


I don't even seem to be able to get it into Debug. It looks like its deployed but then just sits there.
DO I need any Beta firmware as I though that 4.2 was the latest and assumed the SPI function would be in there, or I would at least be able to get it debugging...any more advise would be appreciated.
It also looks like there is alot of stuff going on there, do I need all the files that are in the project, or can I strip it down at all for debugging purposes.

Thanks in advance :)

Logicalstep



#39669 HT1632 interface (alpha)

Posted by logicalstep on 19 November 2012 - 10:44 PM in Netduino 2 (and Netduino 1)

HI all, I've also been playing with the LED Matrix and tried to deploy this solution on my netduino Plus. I don;t suppose anyone knows if it should work? I have the latest 4.2 version, but it won't deploy. I have added the NetduinoPlus Reference into the project instead of the Netduino one, but nothing happening at all...well it looks like it going to deploy but fails with no error codes. Would appreciate some help :) Logicalstep



#39601 SPI LED

Posted by logicalstep on 18 November 2012 - 11:34 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Mario,

After a busy few months and after receiving my new Netduino Plus 2, I'm re-visiting trying to get this LED to work.

I managed to get the SPI working, but I'm stuck on the example code you have given below. Any chance you could clarify it a little for me?
Using the code in your link, it's just rolling around lots of random patterns. :)


The part where you say 'The problem is that they (the Sure designers) chosen to save any remaining unused bit for the adjacent digit. There's no less parts, nor less cost: why they decided to get the implementor's life harder?'

I'm not that experienced with SPI or Serail data (apart from doing some RS232).

Thanks in advance.

Logicalstep



By keeping the bytes "aligned", the task *would have been* relatively easy:

//define the digits pattern
static byte[] pattern = new byte[] { ... };

static void Main()
{
  ... init ...
  Dump(1234);
  ...
}

private void Dump(int number)
{
  //create a buffer to hold the four digits pattern
  byte[] buffer = new byte[4];
  //fill the buffer reversely, because it's more comfortable
  for (int i = 3; i >= 0; i--)
  {
    int digit = number % 10;
    buffer[i] = pattern[digit];
    number /= 10;
  }
  spi.Write(buffer);
}

The problem is that they (the Sure designers) chosen to save any remaining unused bit for the adjacent digit. There's no less parts, nor less cost: why they decided to get the implementor's life harder?
Anyway, this time the routine gets more complex. I'd write something like this:

<br class="Apple-interchange-newline">
private void Dump(int number)
{
  byte[] buffer = new byte[4];
  int temp = 0;
  for (int i = 0; i < 4; i++)
  {
    int digit = number % 10;
    temp = temp * 128 + pattern[digit];
    number /= 10;
  }
  for (int i = 3; i >= 0; i--)
  {
    buffer[i] = (byte)temp;
    temp >>= 8;
  }
  spi.Write(buffer);
}

Maybe could be simplified...any clue?
NOTE: both the above snippets are coming out my mind, and I didn't try them. They're just a trace for a concrete implementation.

Cheers




#38597 Something new is brewing in the Secret Labs

Posted by logicalstep on 06 November 2012 - 09:25 AM in General Discussion

Ok I'm going to throw my hat in the ring and say: QSBzdXBlciBzdGFibGUsIFJhbSBhbmQgQ1BVIHVwZGF0ZWQgTmV0ZHVpbm8gUGx1cyE=



#38547 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by logicalstep on 05 November 2012 - 11:16 AM in Netduino Plus 2 (and Netduino Plus 1)

Thank you Chris, we are waiting for the 4.3 beta this month. We hope the internet glitch is than solved.

@Travor, you did not install (correct) the Netduino driver, please read all the steps to install at the begin.


Hi Ellen,

Thanks for the response, I have tried starting from scratch and installed both of the drivers one by one and I definitely have the correct firmware and Bootloader installed, so I'm a bit lost really.

Many thanks

Trevor



#38504 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by logicalstep on 04 November 2012 - 06:33 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris, I've just got back to my Netduino after a little while and though I'd update the firmware to the latest version. I've downloaded the new 4.2 firmware and Flashed the new TinyBooterDecompressor.bin & TinyCLR and the 4.2 firmware, however when I ping right after flashing the TinyBooterDecompressor.bin, I get a response, but as soon as I flash the two image files I get nothing. The board shows up in the MFDeploy software, but I can't ping it or deploy to it. I've tried the new win and old Mf driver, but no change. Any ideas? Many thanks Trevor



#30697 SPI LED

Posted by logicalstep on 14 June 2012 - 07:06 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for the reply Mario, as soon as I get a chance I'll try it out. Just a quick question: When you say package the byte; 'but *be careful* they must be "packed"' So they are using 7 bits per byte as opposed to 8 bits in a 'standard' byte? How would you go about 'packaging' this in a way that can be used on the same way as your shift register example? Many thanks in advance. Logicalstep



#30610 SPI LED

Posted by logicalstep on 12 June 2012 - 10:37 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi all,

I'm hoping someone can help, I sourced these great seven segment LED boards form China and am trying to get them working with the Netduino.

It appears to show in the manual they are driven with SPI. But I'm struggling even to find the correct connection for the wires.

I'm hoping someone is willing to help make sense of this display, as I think it could be useful to others as well.

Link to webpage:

http://www.sureelect...oods.php?id=135

Many thanks in advance.

Logicalstep



#23453 Serial Port Reader Erros

Posted by logicalstep on 29 January 2012 - 10:39 PM in Netduino Plus 2 (and Netduino Plus 1)

Ok well it appears it was my own stupidity that caused this, so in case anyone else does the same thing, the problem was caused by me having an LED on both the RX and TX lines to see when data was flowing. Without running them through a Transistor. I guess this was dropping the voltage levels enough to cause data errors! Thanks to Chris on Chat for the help. :) Logicalstep



#23444 Serial Port Reader Erros

Posted by logicalstep on 29 January 2012 - 09:22 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Chris, Yes as you describe it is what I'm expecting to see, however the bytes I'm getting back seem very erratic. Sometimes it even works and sends back what I think it should. I'm really struggling to get this working, when really it should be a fairly simple operation, at least in terms of sending and receiving very small amounts of data. The device I'm comms'ing with required Ascii codes, however I'm using UTF8 and converting the string to bytes using this method. Am I right in thinking that Ascii is just a subset of UTF8 and as such shouldn't be causing the issue? To be fair I'm seeing what I would expect in terms of Bytes I'm sending. The only thing I can think is that I'm using the wrong TTL to 232 chip and that it's fine until it requires to do things at a faster speed? I'm using a HIN232IPZ...just looking now it shows it as a 5V chip..could this be the cause? what are the Uart voltages on the Netduino? Many thanks. Logicalstep



#23435 Serial Port Reader Erros

Posted by logicalstep on 29 January 2012 - 08:44 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Mario, Thanks for your reply. So are you saying the program waits until the Bytes to read condition is met? port.Read(bytes, 0, port.BytesToRead); I thought that port.ByteToRead was giving me the number of bytes in the UART Buffer, not that this was a condition to be met by the program? The issue is that the RFID device I'm using isn't giving me bad data as it works fine with the VB PC version. So the only thing left is that I'm not getting all the data back, due to some other communication factor. I've had my share of Serial issues before and usually it's down to timings and settings, but in this case I'm pretty sure I have the settings all sorted. I'm not saying it's not something I've done, but is is possible that there is a reliability issue with the Firmware? Logicalstep



#23429 Serial Port Reader Erros

Posted by logicalstep on 29 January 2012 - 04:16 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi all, I hope someone can help. I'm trying to read Tag Id and Ascii responses from an RFID reader. It send the Tag ID over the Serialport fine, and then I send back a request to start further processing, however the Tag ID arrives fine the first time, but subsequent requests seem to be missing data. So my question is... does the 'port.Read(bytes, 0, port.BytesToRead);' Read in all the bytes from the Serial Port, or just the ones that have arrived since you have reached the Break point? I have already done a program in VB that essentially does a lot of what I'm trying to do and on the VB serial port class, I can set it to keep reading the serial port until there are no bytes to read left. This way I know it's not a timing issue, but on .Net Micro there doesn't appear to be a way to do this, you have to just read in what's there in one chunk. I've tried inserting a small delay before reading the bytes, as I know sometimes it need a moment to 'finish' reading the bytes. So Here is what I have: (for now I have just dimensioned the Holding Byte Array statically to 40 Bytes). static void RecievedData(object sender, SerialDataReceivedEventArgs e) { Thread.Sleep(100); string line = ""; byte[] bytes = new byte[40]; ByteToReadGlob = port.BytesToRead; port.Read(bytes, 0, port.BytesToRead); if (ByteToReadGlob == 11) { SentReq = true; ComSend(":002000" + (Char)13); } else { if (SentReq) { string rcvd = ""; SentReq = false; rcvd = new string(Encoding.UTF8.GetChars(bytes)); Debug.Print("Worked Rcvd " + rcvd); } } ByteToReadGlob = 0; //line = "" + new string(Encoding.UTF8.GetChars(Storbytes)); //Debug.Print(line); //line = "" + new string(Encoding.UTF8.GetChars(Storbytes)); //Debug.Print(line); } }



#23134 New here and have a question

Posted by logicalstep on 22 January 2012 - 01:04 PM in Visual Basic Support

Hi emg, I have upvoted the issue on Codeplex. A real shame that this kind of bug has crept in, I can understand it's Beta, but that doesn't usually mean it completely breaks. I guess these things happen :rolleyes: I've been following the RasberryPi development as well. You day you will be using full .net with it? Have you any links on how that all works for the Pi? Logicalstep



#23131 New here and have a question

Posted by logicalstep on 22 January 2012 - 12:16 PM in Visual Basic Support

Thanks for the quick reply, do you know if there is any fix for this issue. I now can;t use if for C# of VB ;) Can I go back to a previous version? Logicalstep



#23128 New here and have a question

Posted by logicalstep on 22 January 2012 - 11:26 AM in Visual Basic Support

Hi Stefan,

Ha, well there you go, the exact example I was asking about!

Well, there is more knowledge available for C# at this time, and the latest stable firmware supports only C#, but VB is fun, and if nobody starts with it, no resources will ever spawn



I see what you are saying, but as in your sentence, people always say things like ' but VB is fun' and it's that kind of comment that leads me to believe VB is not considered to be a 'proper' programming language. Now don;t get me wrong I've done some things on windows that would have taken me ages to learn in C#, so in that respect VB is great.

But it seems to me that C# is still considered more of a programmers language and also when working in the .NET Micro, I have a feeling because it's again more similar to the Arduino C, that it will naturally see a lot more coverage in terms of people wanting to learn it.

I think I was also getting a little confused when reading about how it setup VB on the netduino. For some stupid reason I thought you had to choose one or the other. But it looks like you can just switch between them as you choose, as long as you have the correct SDK and Firmware. Is this the case?
Also I tried to update the Board with RC3 and the latest Tinybootloader, but I get deployment issues. I'm pretty sure I followed everything to the letter, but it just shows as 'Deploying' but never does. Sometimes it'll even get to ' Ready' but in the bottom right I still see the animated build logo churning away. Is this a known issue?

Thanks for your help so far guys.

Logicalstep



#22964 Mifare RFID Example Code With I2C LCD Output

Posted by logicalstep on 18 January 2012 - 09:58 PM in Visual Basic Support

Hi Pete, Thanks for the post I was looking into an RFID project myself! Can you tell me how you found programming in VB on the mircro framework? I still torn between learning C# and just going ahead an using VB which I'm more familiar with? Thanks Logicalstep



#22844 New here and have a question

Posted by logicalstep on 16 January 2012 - 08:34 PM in Visual Basic Support

Thanks for the advice Baxter, At the risk of repeating myself...would you at this stage recommend VB or C# in terms of easy of use and supporting library's? It seems like VB is lacking some examples of things like using SPI and shift registers. Regards Logicalstep



#22448 New here and have a question

Posted by logicalstep on 04 January 2012 - 07:36 PM in Visual Basic Support

Hi Baxter, Thanks for your reply. So you have found it to be stable to use for important projects? It sounds like this may be the way to go if I need to get this developed fast. I haven;t found very good references to the classes in the micro framework it does seem that MS isn't really giving this the attention is deserves, but then that probably just a matter of time. It's interesting what you say about using a time service, I had planned to use a real time clock over SPI, but I guess if I'm using networking I could just set the board clock via the web. Have you done any time comparisons in the micro framework? Also I learned the hard way about unsafe coding on VB.net Assuming by unsafe you mean basically option strict on? Thanks again! Logicalstep



#22358 New here and have a question

Posted by logicalstep on 02 January 2012 - 06:05 PM in Visual Basic Support

Hi All, Firstly, great forums, loads of helpful info from members. I have a Netduino Plus and am about to start a project. I am VB biased and have so far just been playing with simple C# examples. My question is: This project will be fairly complex for me in terms of the functions I need within it. There will be serial port and IP networking, but mainly string and date time comparisons. So should I stick with C# due to it's maturity, or is VB at such a stage that I should consider this? Thanks in advance. Logicalstep




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.