- Netduino Forums
- → rhamer's Content
rhamer's Content
There have been 29 items by rhamer (Search limited from 04-June 23)
#22688 VB I2C zx-relay16 MCP23016
Posted by rhamer on 11 January 2012 - 03:57 AM in Visual Basic Support
#22749 Can I2cBus Class be used with VB?
Posted by rhamer on 13 January 2012 - 06:01 AM in Visual Basic Support
#22811 I2C Bug in 4.2
Posted by rhamer on 15 January 2012 - 11:44 PM in Beta Firmware and Drivers
Im using a Netduino Plus and programming in VB.
This is the code;
Dim BytesSent As Integer Dim con As I2CDevice.Configuration = New I2CDevice.Configuration(64 >> 1, 200) Dim MyI2C As I2CDevice = New I2CDevice(con) Dim data As Byte() = New Byte() {2, 255, 255} Dim xActions As I2CDevice.I2CTransaction() = New I2CDevice.I2CTransaction() {I2CDevice.CreateWriteTransaction(data)} BytesSent = MyI2C.Execute(xActions, 1000)
The problem is to do with the selected clock speed.
If I set the clock speed in the configuration line to 100 I get badly formatted data and that is probably because the clock is only actually running at about 95 Khz See first Attachment.
If I then change the clock to 150 I get correct data but 3 extra bytes are added to the end. See attachment 2.
Then if I use a clock speed of 200 or above I get the correct data as shown in attachment 3 and all works as expected.
I have also found that sometimes the Netduino fails to send anything at all, and I have to power cycle it to get it working again.
Can anybody explain this?
Regards
Rohan
#22851 I2C Bug in 4.2
Posted by rhamer on 17 January 2012 - 12:27 AM in Beta Firmware and Drivers
#23256 Bug in system.net.sockets
Posted by rhamer on 24 January 2012 - 10:28 PM in Beta Firmware and Drivers
using the following code, I get an exception thrown on every ninth byte.
Public Function SendData(Data As Byte) As Boolean Dim ret As Boolean Dim DataByteArray() = {Data} Try clientSocket.Send(DataByteArray) ret = True Catch ex As Exception ret = False End Try Return ret End Function
This happens reliably every time.
The other odd thing is when I look at the data using wireshark, the data in the packets is always as follows.
1 data byte
7 data bytes
(exception thrown byte never sent)
1 data byte
7 data bytes
(exception thrown byte never sent)
this pattern continues until there is no more data to send.
If I catch the false return from the above method and just call the method again with the same byte, it works, so it is not the contents of the byte that is the problem (it is also different with every ninth byte not being the same data anyway)
Recalling the same method after an exception fixes the problem in as much as the byte is eventually sent, but it slows down the execution dramatically as you can imagine, and is not an acceptable workaround.
Can anybody think of something I might be doing wrong?
Regards
Rohan
#23264 Bug in system.net.sockets
Posted by rhamer on 25 January 2012 - 01:56 AM in Beta Firmware and Drivers
Just to clarify, you are sending a single byte with each call of "clientSocket.Send" ?
-Valkyrie-MT
Yes that is correct.
Regards
Rohan
#23269 Bug in system.net.sockets
Posted by rhamer on 25 January 2012 - 04:05 AM in Beta Firmware and Drivers
Public Function SendDataArray(Data() As Byte) As Boolean Dim ret As Boolean Try clientSocket.Send(Data) ret = True Catch ex As Exception ret = False End Try Return ret End Function
The difference here is I'm passing a byte array into the method (instead of just a byte) which should make no difference at all, except the array contains more than 1 byte.
I can repeatedly call this method with no exceptions being generated.
Regards
Rohan
#23270 Are there timers on the Netduino Plus?
Posted by rhamer on 25 January 2012 - 04:10 AM in Netduino Plus 2 (and Netduino Plus 1)
#23375 Are there timers on the Netduino Plus?
Posted by rhamer on 27 January 2012 - 09:36 PM in Netduino Plus 2 (and Netduino Plus 1)
Hi,
Yes.
Here's a reference: http://wiki.tinyclr....le=SystemTimers
Dan
Thanks Dan, I'll take a look.
Cheers
Rohan
#24878 Multiple i2C Devices with VB
Posted by rhamer on 29 February 2012 - 10:49 PM in Visual Basic Support
#25428 Netduino Firmware v4.2.0 RC4 (Netduino + Netduino Plus)
Posted by rhamer on 12 March 2012 - 10:45 PM in Beta Firmware and Drivers
Target for the next beta is 2-3 weeks from today. There will be a lot of updated code pulled into it.
Chris
Is any of it in the I2C area?
Unfortunately I am very close to having to abandon the Netduino Plus as the essential things I need (I2C & VB) are just not working properly yet.
Add to that the constant IDE crashes and the occasional Blue Screen when pressing the Netduino reset button during a download and I'm not making any progress at all, while my deadline grows nearer.
I really don't want to sound like a complainer, and I know this is only Beta firmware, but it has been in Beta for a while, and I cant see the roadmap or timeframe. is there one?
Regards
Rohan
#25443 Netduino Firmware v4.2.0 RC4 (Netduino + Netduino Plus)
Posted by rhamer on 13 March 2012 - 03:18 AM in Beta Firmware and Drivers
Thanks for the reply. I really dont want to be one of those whinging types.
The I2C bus is here http://forums.netdui...h__1#entry22811
I dont know about the beta drivers, I don't think so as I'm not sure where they fit into the environment. I just followed the instructions posted by another user and it didn't include anything for the IDE/PC end. What exactly are they for and how do I use them?
One more thing with regard to the I2C classes, is the inability to connect to more than 1 device. There seems to be some home brew classes to get around this, but nothing with clear instructions on how to use them. I see this as a huge deficiency in the I2C routines as the whole point is I2C is a bus. Having said that, if there is an official workaround (for VB) that you recommend I would be happy to use it.
BTW just so you know, the project I'm working on is a commercial application that will need 15 NetDuino Plus' to control various pieces of hardware, but it also needs to be rock solid. I hope things can be turned around soon as I only have a few more days before I will have to decide to stick with the ND or look somewhere else.
Thanks again for your help.
Regards
Rohan
#28989 VS2010 Crash on debug
Posted by rhamer on 14 May 2012 - 05:11 AM in Visual Basic Support
#28991 VS2010 Crash on debug
Posted by rhamer on 14 May 2012 - 05:30 AM in Visual Basic Support
#29425 VS2010 Crash on debug
Posted by rhamer on 20 May 2012 - 04:32 AM in Visual Basic Support
#29549 VS2010 Crash on debug
Posted by rhamer on 22 May 2012 - 09:50 PM in Visual Basic Support
#29561 VS2010 Crash on debug
Posted by rhamer on 23 May 2012 - 03:06 AM in Visual Basic Support
#30409 Event handlers sample
Posted by rhamer on 08 June 2012 - 06:30 AM in Visual Basic Support
#30410 VS2010 Crash on debug
Posted by rhamer on 08 June 2012 - 06:40 AM in Visual Basic Support
#30561 Event handlers sample
Posted by rhamer on 12 June 2012 - 12:17 AM in Visual Basic Support
#30651 Error Deploying Solution
Posted by rhamer on 14 June 2012 - 01:03 AM in Netduino Plus 2 (and Netduino Plus 1)
#30679 When will V4.2 really be released and working?
Posted by rhamer on 14 June 2012 - 10:44 AM in Beta Firmware and Drivers
#30703 When will V4.2 really be released and working?
Posted by rhamer on 14 June 2012 - 11:18 PM in Beta Firmware and Drivers
#30704 Hints, Tips and Workarounds for Deployment Problems
Posted by rhamer on 15 June 2012 - 12:14 AM in Beta Firmware and Drivers
#30711 Deploy and Debug via Ethernet, is it possible?
Posted by rhamer on 15 June 2012 - 03:35 AM in Netduino Plus 2 (and Netduino Plus 1)
- Netduino Forums
- → rhamer's Content
- Privacy Policy