Seeed's site does mention they are working on a 1.1 version of the board that moves SPI to the ICSP header. A better design would have been to use the SPI pins on the ICSP header which is consistent on the Uno, Mega, Due and Leonardo but such is life and we have to work with what is available right now. They used pins 11,12,13 to access SPI on the Uno. The CAN-BUS shield incompatibility with Arduino boards other than the Uno arises from where Seeed chose to access the SPI pins. In this post I am going to show how to use the Seeed CAN-BUS shield with an Arduino Mega 2560. The Seeed website had some info on how to use the shield with a Mega but their info was not complete and did not work for me. I sourced this info from a few different forums and thought I would write up a complete post on exactly how to do this. Maybe will get lucky and data size of read and variables is the issue, otherwise one might have to dig more into how the library works.The Seeed Studio CAN-BUS shield is designed specifically to be used with an Arduino Uno but with a simple modification you can use it with several other Arduino boards. You might be fine on this part, but sometimes to be processor independent, one might define exactly the byte layouts of their packets. Some may put the byte with the high order bits first, some may put the low order bits first. Not all processors order the bytes in the same order. So for example on the T4, these will be 4 bytes. When you use a generic data type like int, it will depend on what processor you are compiling on. */So what is the payload that your module can handle or setup for? * len Maximum number of bytes to read into the buffer * buf Pointer to a buffer where the data should be written Interrupt flags are now cleared during reads instead of Use available to determine if packets are * I specifically chose 'void*' as a data type to make it easier * The size of data read is the fixed payload size, see getPayloadSize() My thought was that it might be a timing issue, since the arduino is 16mhz and the teensy 600mhz? These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a. External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). I used to run the receiver code on another arduino mega2560 and that one received the Array just fine. The 8-bit board with 54 digital pins, 16 analog inputs, and 4 serial ports. PUTTING ALL VALUES IN AN ARRAY FOR SENDING IT OVER NRF24L01 RADIOĪrray=2000-LY //INVERTED VALUES (DOWN IS 0 AND UP IS 2000)Īrray=2000-LX //INVERTED VALUES (LEFT IS 0 AND RIGHT IS 2000)Īrray=2000-RY //INVERTED VALUES (DOWN IS 0 AND UP IS 2000)Īrray=2000-RX //INVERTED VALUES (LEFT IS 0 AND RIGHT IS 2000) READ CALOBRATION DATA FROM THE EEPROM IN 2 BYTE'S PER VARIABLE Void EEPROMWriteInt(int address, int value) WRITE CALIBRATIONS DATA TO THE EEPROM IN 2 BYTES U8x8 Text Only Example: No RAM usage, direct communication with display controller. Less RAM usage, should work with all Arduino boards. Page Buffer Examples: firstPage/nextPage. Fast, but may not work with all Arduino boards because of RAM consumption Const byte address = "00001" //Choose a unique adress (should be the same on the receiver side)įrame Buffer Examples: clearBuffer/sendBuffer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |