I am having I2C issues.. I am working on My drivers forthe RFID reader and I am running into issues. I am not sure if it is a codeissue maybe I am doing this all wrong but I have had no problems in the pasttalking to EEProms over i2c but with 4.2 RC3 I had no data going out my I2Cports and on 4.2 RC4 I am getting weird stuff. Here is my code for my commandmaybe I am doing something wrong. And I have attached an image of the Logicanalyzer it doesn't even seem to be sending the right Bits. Any Ideas.
private I2CDevice rfid = new I2CDevice(new I2CDevice.Configuration(0x42, 400)); private byte[] ExecuteReadCommand(ERfidCommands cmd, byte[] data) { byte[] b; if (data == null) b = new byte[2]; else { b = new byte[data.Length + 2]; } var rb = new byte[12]; b[0] = (byte) cmd; var csum = (int) cmd; if (data != null) { for (int x = 0; x >= data.Length; x++) { b[x + 1] = data[x]; csum += data[x]; } } b[b.Length - 1] = (byte) csum; I2CDevice.I2CTransaction[] t = new I2CDevice.I2CTransaction[2] { I2CDevice.CreateWriteTransaction(B), I2CDevice.CreateReadTransaction(rb) }; rfid.Execute(t, 100); while (rb[0] == 0x00) { rfid.Execute(t, 100); Thread.Sleep(10); } return rb; }
- Netduino Forums
- → Terry Massey's Content
Terry Massey's Content
There have been 41 items by Terry Massey (Search limited from 28-April 23)
#24040 Netduino Firmware v4.2.0 RC4 (Netduino + Netduino Plus)
Posted by Terry Massey on 10 February 2012 - 05:31 AM in Beta Firmware and Drivers
#23923 Netduino Firmware v4.2.0 RC4 (Netduino + Netduino Plus)
Posted by Terry Massey on 07 February 2012 - 08:23 PM in Beta Firmware and Drivers
private I2CDevice rfid = new I2CDevice(new I2CDevice.Configuration(0x42, 400)); private byte[] ExecuteReadCommand(ERfidCommands cmd, byte[] data) { byte[] b; if (data == null) b = new byte[2]; else { b = new byte[data.Length + 2]; } var rb = new byte[12]; b[0] = (byte) cmd; var csum = (int) cmd; if (data != null) { for (int x = 0; x >= data.Length; x++) { b[x + 1] = data[x]; csum += data[x]; } } b[b.Length - 1] = (byte) csum; I2CDevice.I2CTransaction[] t = new I2CDevice.I2CTransaction[2] { I2CDevice.CreateWriteTransaction(B), I2CDevice.CreateReadTransaction(rb) }; rfid.Execute(t, 100); while (rb[0] == 0x00) { rfid.Execute(t, 100); Thread.Sleep(10); } return rb; }
#26481 Redacted 00101100
Posted by Terry Massey on 04 April 2012 - 10:13 PM in General Discussion
From the specs page:
"
all 8 sockets: go!bus modules
up to 2 sockets: Gadgeteer S-U-X
"
So it looks like there is some gadgeteer compatibility, right?
Any one else think maybe the S-U-X was on purpose???
#22295 What's in the magical, mysterious, box of crappy surplus?
Posted by Terry Massey on 01 January 2012 - 12:45 AM in General Discussion
#22269 What's in the magical, mysterious, box of crappy surplus?
Posted by Terry Massey on 31 December 2011 - 03:30 AM in General Discussion
It is a little disheartening since he has had it for over a month.
Apologies all I will have it out on Tuesday. I unfortunately have been disconnected for a bit as I have been moving and started a new Full time job. Again I do apologize.
#24366 What's in the magical, mysterious, box of crappy surplus?
Posted by Terry Massey on 18 February 2012 - 03:08 PM in General Discussion
#23688 RN-XV WiFly Module driver
Posted by Terry Massey on 02 February 2012 - 04:37 PM in Project Showcase
#12041 Easy multiplexing with the Netduino
Posted by Terry Massey on 12 April 2011 - 09:41 PM in Project Showcase
#11959 Updated web server
Posted by Terry Massey on 11 April 2011 - 04:38 PM in Netduino Plus 2 (and Netduino Plus 1)
You will need to have a look at the documentation for you router to work out how to do this. You should also review security arrangements and make sure you are fully aware of what you are doing and the security implications. You will usually open a port and then tell the router to send all traffic on that port to a specific IP (the N+ address).
Something else you need to review is you Internet facing IP address - is this static or dynamic? If it is dynamic then you will need to look at a service like dyndns (I think that's the name - it's been a long time since I used them).
Regards,
Mark
Nevyn - DynDNS is correct.
Jony - Linksys has a very nice feature that will allow you to do exactly as Nevyn just said. It is called Port Fowarding. All you need to do is login to your router using your gateway address. Your gateway will be the address of your router. Then depending on the exact model where that is located is different. However also depending on your service provider many ports are blocked to force you to purchase a business account. If you need more detailed help I can but the forum is not the best place to do this. a Chat would be better. You can PM me your Info I can help.
Good Luck,
Terry
#11918 Updated web server
Posted by Terry Massey on 11 April 2011 - 05:09 AM in Netduino Plus 2 (and Netduino Plus 1)
Hi i'm a new user and i'm trying to acces to the Netduino+ via Internet and not only in the local area network, but could someone tell me the settings that i need to do please? Thanks to the community
that is more a routing issue than a netduino issue. as for netduino getting an IP I don't have one yet... but i do know web servers. and the key is in your router.... can you tell me how you connect it to the network/internet and what devices you have I can help with the router config... well depending on the model.....
#23679 Resistors
Posted by Terry Massey on 02 February 2012 - 01:57 PM in General Discussion
Just a thought
I really don't know how many are the people having visual inabilities, or whatever they call.
BTW, this post makes me thinking a lot about this problem...and how to solve it. The multimeter way is obvious, but if I were -even an hobbist- testing almost all the resistors...surely I'll throw everything out of the window...
My "open" question is: suppose having a normal webcam connected to the PC, then a imaging-processing software capable to "rotate" the colors. I mean acquiring a certain HSL (Hue-Sat-Luma), then change it upon the user's preferences. The result is displayed directly on the PC.
Well, surely *NOT* a panacea, but it's pretty simple to do, taking advantage of tons of free libs anywhere. Also a webcam is just an affordable device.
I must admit that this question is slightly off-topic, but...anyone would like to comment?
Cheers
#12081 uIP Introduction
Posted by Terry Massey on 13 April 2011 - 04:22 PM in General Discussion
I think that's pretty good considering that the driver is operating in interrupt mode and I'm not sure if LAN-connection is 10 or 100 Mbit/s.
hanzibal,
The enc28j60 is only capable of 10Base-T which is 10MBit/s.
#13078 +5V instead of +3.3V
Posted by Terry Massey on 10 May 2011 - 12:48 PM in Netduino Mini
From the datasheet: Absolute Maximum Ratings
Voltage on Input Pins with Respect to Ground...........................-0.3V to + 5.5V
CW2: If you look at page 37 of the summary datasheet is says 8 independent 3.3 v Analog inputs.
#12816 +5V instead of +3.3V
Posted by Terry Massey on 04 May 2011 - 01:11 PM in Netduino Mini
True, but I needed a small form factor, not ethernet.
Although some day I would love a Plus, there's no need for it now and it costs money!
Stefan,
If you need 3.3v as well on your project. My Netduino Mini Breakout has a 3.3v regulator and provides that supply voltage, and can be used both with the vin and the 5v inputs. As well as powering over USB. A distributor in your neck of the woods will have them in stock in the next few days. The breakout board is ~half the width of the Netduino mini and the same length.
A quick note on my Netduino Mini Breakout boards the current shipping version does not support external power and USB connection at the same time. Doing so can damage your mini.
#13074 +5V instead of +3.3V
Posted by Terry Massey on 10 May 2011 - 12:31 PM in Netduino Mini
Can't? Now it gets complicated
Don't want to break my netduino offcause, still haven't soldered the boards, so I think I'll wait until there's a conclusive answer to this
Sure Stefan don't believe me if not check the tech spec page. analog input is from 0 to 3.3 V at a max of 2mA per pin.
http://www.netduino....duino/specs.htm
analog reference: 2.6 - 3.3 VDC
max current: 8 mA per pin<br class="auto-style25" style="font-family: Tahoma; font-size: small; ">digital pins 2, 3, 7: 16 mA per pin
analog pins 0-3: 2 mA per pin
microcontroller max current: 200 mA total
#13072 +5V instead of +3.3V
Posted by Terry Massey on 10 May 2011 - 12:18 PM in Netduino Mini
LOL! This is the Danger Shield
It can help give me (and others) some understanding of things, but since it's Arduino based, it's 5V. I just want to know in advance if I need to make modifications to correct that. Appairently, it won't be a problem except that the analog interfaces will be a bit more sensitive.
Holland will still be safe, I actually have a fire extinguisher in my room
You cant put 5 volts into a netduino analog port.
#12531 High Speed Photography
Posted by Terry Massey on 27 April 2011 - 12:34 PM in General Discussion
Is there a way to test this delay between tripping a trigger and performing a pin short?
Why would the delay be variable?
Garbage Collection. If garbage collection occurs while your trying to fire it off your code would be put on hold so thus the variable. You don't know if garbage collection will occur.
#12160 ThingSpeak Twitter - Revisited, Cleaned up.
Posted by Terry Massey on 16 April 2011 - 09:27 PM in Project Showcase
#12235 C# Coding standards
Posted by Terry Massey on 19 April 2011 - 12:57 PM in General Discussion
Please, I do not want to open a can of worms here :-)
I'm not arguing. or trying to open the can anymore, however I will put in my two cents. One statement in the standards, I do Disagree with but only partially. It says DO NOT use Hungarian Notation! I will say if you give me a code snippet to help you out with something. and there are variables declared out of the current context. Hungarian Notation is very helpful. I don't know everything about your code so I have to make a guess as to the type. and My guess could be wrong making it take 3-4 Times as long to help you out. I come from a background where Hungarian Notation was used well strictly. However I have since grown lazy since I moved to c# from VB and VBScript. Intelisense takes care of most of that question for you. but a snippet well is just that. it is a small snapshot of a great meaning. So it just helps.
#17034 A Hardware guy drowning in a Software world!
Posted by Terry Massey on 25 August 2011 - 03:09 AM in General Discussion
#12241 C# Coding standards
Posted by Terry Massey on 19 April 2011 - 02:09 PM in General Discussion
As an old 16 bit Windows C programmer, I used to be a big user of Hungarian Notation. You may wish to read http://www.joelonsof...cles/Wrong.html where Joel Spolsky talks about the difference between Apps Hungarian and Systems Hungarian. (Scroll to to the bottom of the post to find it).
I believe Apps Hungarian is extremely useful, but quite frankly today with managed code Systems Hungarian has lost much of its usefulness.
very nice article...... I like where he says I use kind on purpose. type/kind... Well there is a difference. because if I used oSomeCustomObject... that is just useless... but then again the variable name should be descriptive. however if for instance you have a integer/double/long/decimal to me that is very important to differentiate. because precision changes things. Is this a whole number or a decimal value and how precise it is. however if I could easily see that the value is an integer because you put i in front well I know the amount of precision. and the number of bytes it is taking up. so if your having a out of memory issue well knowing the type is important. but yes I agree I really like the suggestion on the us an s.. I do tons of web programming and that is a nice way to handle that..... I might have to start doing that.
#12060 Are there any commercial products using NETMF?
Posted by Terry Massey on 13 April 2011 - 05:56 AM in General Discussion
Well, Netduino to us is not about money. It's about passion and it's about empowering people. To date we've more or less rolled any profits from Netduino back into new board designs, software, hardware donations, community support, etc. We plan to make some money with kits and accessories...but frankly we're just as happy when we see community members build successful Netduino kit/accessory businesses. [And in case you hadn't noticed, companies are making millions of dollars off of open source hardware kits/accessories. Not all of them are for Netduino--but Netduino users are a significant growing portion.]
I actually also really love the other products we build (software, hardware, and services) at work. But mostly because we're really proud of them, and because we try to create disruptive products that people will enjoy using.
But yeah, building things with the sole intent of making lots of money can suck the joy out of things. Making a living is important, yes, but if you can find the right balance...you can make a good living and love doing it.
Chris
To back up what Chris is saying.... I love working on hardware and software... As a person with passion, that I feel is probably the biggest key to being successful in business. I am not of course saying to ignore the business side of things. However Passion and love of a job well done, doing something that you love doing is very powerful. an enthusiastic and optimistic outlook even when things aren't selling also helps. And even then looking back there are sales I have made out of desperate attempts at trying a new method in sales. for instance this just happened recently. I have this huge belief that my netduino Mini Breakout will not only help my sales but the sales of the netduino mini. I also know that if there were others like myself without a serial port on their laptops this board would be the greatest asset designed specifically to work on the mini. So one night a week or so ago with sales not doing so well. I sent out a ton of emails to companies around the globe telling them I wanted to send them a free board if I could just get a contact to send it to. Also be aware these were form letters, but I personalized each email based on the company I was sending it to making slight modifications based on the research I did on their business. With in hours of my email blast I had emails back asking for quotes not free boards. while maybe my prayers before I sent them helped, That I don't know. but even in my most desperate attempts to keep doing what I love. I found new ways of keeping that passion alive. See that is the Key passion. If you love doing this and have a overwhelming passion for it I say go for it. because that passion will carry your thought the rough times. I never stop dreaming up ideas. Sometimes its just a little idea I hear about someone doing some crazy little thing on the forums or in the chat. I may not have the kind of sales yet that Walker does. but I understand his passion. I understand that passion for what a company is and does is what makes it successful... If your interested in some reading there is a great book called Good To Great by Jim Collins. in this book he researched and interviews some very influential companies and CEO's. He discusses what it is about them their characteristics and what makes them so successful. and when they change from following their own rules they fail. In fact one or two companies since he published have, and they did change from what made them great. There is an entire chapter devoted to passion for what you do.
I hear that same concern often from many people that I love doing this I'm afraid if I make it my job I will begin to hate it. I think it all comes down to how much you love doing it. the thing about this industry is it is a little slower moving than I am use to. and I started to get impatient with it. See in software: we develop, we test (Repeat We Develop if not right) , we deploy. Pure and simple. That is not true exactly in hardware. In hardware we design, we Prototype, we redesign, we re prototype, we deploy if correct. however the time line for a prototype is much longer. We have to wait for boards to be produced and assembled usually at least for me out of country. and we cant simply upload a file to a webserver. now we have to worry about shipping and all of that. but to me the joy comes from the design and manufacturing process. and seeing and hearing people talk about what i have created. and how they are going to use that board or design in their next project. so I ignore the things I don't like. thats true with any job though there are things we always hate. like in software status meeting with a management person who doesn't understand the software development process. every job has the things we hate. but if the passion for the work is there that is the key. ok I am now rambling and I kinda butted in on this conversation but I feel very strongly about this subject. Because passion makes everything wonderful...
#17957 Proto Board or Perf Board
Posted by Terry Massey on 14 September 2011 - 01:16 AM in General Discussion
Without a production facility surface-mounted components would be hard to use, and size might not be a major issue, so I would go for hole-mounted components to start with. That would then also work in production, if I would ever get that far.
Volume production is an area that requires much more logistics and that I haven't had to deal with much (except in terms of test mounts and such), so I would surely consult an expert for that.
I have some experiance in the logistics of it and 99% of them prefer the surface mount design. it can be done primarly automated where a through hole requires manual labor in most cases. yes there is wave soldering however generally that is not an option most facilities have. As for my original question I think the answer is clear no one really would use a protoboard. or if so the cost is not reasonable so other ideas tend to surface. also while through hole is easier it tends to be much more expensive. a 0603 10k resistor is about $0.003 where a through hole equilivlent is well much more. same for other components like capacitors and even chips if there is a surface mount version it is likely that version is cheeper.
I will make an offer any one seeking to have boards made for a design be it you need help with layout or even schematic design I have the team and the tools to not only have the board designed but also to do any level of manufacturing from prototype to full on production. I will offer very reasonable and competative rates. I can even offer some distribution options and the shieldstore is not the only place I can help with that.
#17039 Proto Board or Perf Board
Posted by Terry Massey on 25 August 2011 - 04:46 AM in General Discussion
#17222 Proto Board or Perf Board
Posted by Terry Massey on 29 August 2011 - 02:28 AM in General Discussion
- Netduino Forums
- → Terry Massey's Content
- Privacy Policy