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.

lifanek

Member Since 02 Sep 2013
Offline Last Active Dec 25 2016 05:42 PM
-----

Topics I've Started

How to convert hex value stored in string to binary in string?

01 March 2014 - 03:49 PM

Hi all,

I'm trying to accomplish something like this:

http://www.serasidis...scontroller.htm

and now I'm writing some code to decode PDU format to text.

The steps are:

- Some values represented by hex numbers stored in string, i.e. "31584C1E8BC160"

- Reversing it like this ===>  "60C18B1E4C5831"

- Here comes the hardest part - every 7 bits I need to add a 0 bit, because PDU uses 7-bit GSM ASCII.

I can convert it right away beacuse it is stored in hex and everything is shifted by 1 bit every 7 bits.

(see this http://www.serasidis..._conversion.gif )

 

I wanted to do it like this:

 

string hex = "60" (first two chars from the main string)

int x = Convert.ToInt32(hex, 16)

BinaryString = Convert.ToString(x, 2)

 

but it seems that there is no Convert in .NET MF :(

 

Is there any workaround possible for this?

Thanks,

Lifanek

 


[HELP] Using uPLibrary to post to ThingSpeak

05 February 2014 - 04:05 PM

Hi all!

 

Those are my first attempts to Netduino and internet communiation :)

 

I have followed this tutorial with success:

 

http://community.thi...and-thingspeak/

 

I've connected potentiometer to my Netduino and it was posting data and channel status to Thing Speak.

Everything is great about it, but I found out uPLibrary so what I did:

 

Updated to VS 2012 Express (on 2010ex I couldn't install Nuget).

Updated .Net, SDK and my N+ firmware.

After downloading Nuget and creating new project Ive typed in Nuget console Install-Package uPLibrary.

I wanted to give it a try so I re-writed firs code from here:

 

http://www.embedded1...k-platform.aspx

 

but I get strange error when I'm trying to debug it. Please help!

 

I've attached files with error and code screenshots.

 

BTW.: Are there any simple code examples for this uPLibrary? It is quite hard for a begginer to examine it on my own :) and the library is very interesting.

 

Thank You all in advance!

 


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.