mattallen37 wrote:If you use the fast mode (exclusive to the later versions of the EFW), I think the bus runs at about 30kbps instead of 9.6kbps.
The analog values are updated at 300Hz.
For I2C, I think you would need 400kbps in order to get readings every 0.1ms, and even then you would be really pushing it. Even 1ms read intervals is probably not possible. Based on testing I have done, it seems that using fast mode with the EFW, the read time is like 2 to 3ms.
mattallen37 wrote:NXT + Arduino is a ton of fun! I have I2C, and also RS485 libraries for the NXT (in NXC) and the Arduino.
AtMega328 Arduinos are really nice, but they only have one UART. Arduinos use UART for programming (and any debugging you might want to do), so it can be a bit inconvenient to try using the UART for RS485 as well.
If you get an AtMega32U4 based Arduino, you can have even more fun! The AtMega32U4 uC supports USB (slave), so when you plug it into the computer, it can appear as a COM port and a HID (Human Interface Device). By default it appears as a keyboard and mouse, but I've modified some files to make it appear as a joystick and consumer device as well (at the same time!). The "UART" used to upload the program is completely virtual (CDC through USB), so the HW UART can easily be used for RS485. There isn't as much support yet for the AtMega32U4 boards, but they are getting more popular. Such boards are the Leonardo (actual Arduino board), the Pro Micro (by Sparkfun, and also in a 3.3 volt version), and the LeoStick (by freetronics). I personally have a 5v Pro Micro, and have been really enjoying it!
mattallen37 wrote:Do note, that UART with the Arduinos seems to be limited to 115200 baud (bits per second on the bus). It is however still much faster than I2C. There is no way you will get 10000Hz updates being streamed in real time to the NXT, but if it doesn't need to be real time, the Arduino can take digital samples really quickly, and then send them later.
What exactly are you trying to do?
Users browsing this forum: No registered users and 0 guests