rgarside
Active member
I'm very impressed at the amount of progress being made - Have you tried contacting Timo to ask him questions?
Read this thread. Fascinating. Didnt understand a word of it but it sure is geeky.
I'm very impressed at the amount of progress being made - Have you tried contacting Timo to ask him questions?
Read this thread. Fascinating. Didnt understand a word of it but it sure is geeky.
I know very little about the Arduino, only what I have picked up in converting code for a PIC microcontroller. However, I believe you still have to tell it what pins you are using for SPI, perhaps in the constructor?
If you are using SPI to interface to the canbus chip then I guess any arduino will do? I've got a couple of pro minis lying around so may have a crack at this if so.
edit: just seen this board. looks like it might simplify some of the wiring and allow use of smaller arduinos: http://www.microchip.com/wwwproducts/Devices.aspx?product=MCP2562
... I'm struggling figuing out what this bleeding Due does and it's config files...
Not really, all the info is online plus an incredible amount of discussion already of any weirdness and masses of help on the arduino forums. What does come up more often are run arounds getting shields to work which have their own eccentricities rather than the boards themselves.This is what I perceive as the major problem of the Arduino. It masks the underlying structure of the microcontroller in an attempt to simplify the interface, but in doing so makes it hard to do anything out of the ordinary.
This is what I perceive as the major problem of the Arduino. It masks the underlying structure of the microcontroller in an attempt to simplify the interface, but in doing so makes it hard to do anything out of the ordinary. Most people use Arduino devices by copying code they find online.
Personally I use PIC Microcontrollers programmed in C, either on a development board or on a home-built one. The initial learning curve is steeper, but once you get the idea then the possibilities are limitless.
[Edit]
Latest project, Water Tank Gauge
Vas
The Due board is not a standard one available in the IDE so it has to be added - go to 'Tools'>Board>Board manager
The advantage of the Due for N2K stuff is that it has can bus pins as standard so the config is supposedly easier (using MCP2562 chip) but I'm still working on it.
The disadvantage is that input voltages must be limited to 3.3v so essential to include a voltage divider to reduce any voltage greater than that OR use an opto-isolator which enables differing voltages either side.
I am hoping to get mine running this coming week. At the moment I have everything assembled on a test panel, at home, and am using an Arduino Nano to simulate wind transducer input, but will be using actual GPS, actual Depth transducer input, multiplexing all together and outputting to (hopefully) both N2000 and N183
But, you are smart enough to own a boat with switches, fuses / breakers & "real" wires, that you can trace & repair underwayJust what I thought. It's like a foreign language to me, makes me realise how little I know.
But, you are smart enough to own a boat with switches, fuses / breakers & "real" wires, that you can trace & repair underway
Not all Technology is an an advance is it KISS :encouragement:request: This thread is interesting to some and very specific, if people would like to discuss the merits of technology could they please not dilute this thread but maybe start another one?
ta
Not all Technology is an an advance is it KISS :encouragement:
This is what I perceive as the major problem of the Arduino. It masks the underlying structure of the microcontroller in an attempt to simplify the interface, but in doing so makes it hard to do anything out of the ordinary. Most people use Arduino devices by copying code they find online.
Personally I use PIC Microcontrollers programmed in C, either on a development board or on a home-built one. The initial learning curve is steeper, but once you get the idea then the possibilities are limitless.
[Edit]
Latest project, Water Tank Gauge
Until i get everything going IN to the Due in correct voltage and logic, I can't check whether anything (sensible) is being sent to canbus pins. Once i check that I'll let you know what libraries worked. AT moment the sketch (untested fully) has
#include <TinyGPS.h>
#include <Arduino.h>
#include <N2kMsg.h>
#include <NMEA2000.h>
#include <N2kMessages.h>
I'm thinking of changing to TinyGPS++ as it seems better but that means changing sketch again!
If you delve into the above libraries you will see that they call other libraries too
eg
Tiny GPS library calls:-
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#include <stdlib.h>
N2KMessages calls for #include <N2kMsg.h>
NMEA2000.h calls for #include <N2kCANMsg.h>
and so on.
I guess you know, do you, that when the sketch compiles it only uses the parts of libraries that it needs to run the sketch so there's no harm in including stuff you don't need, other than confusion!
Back to my original posted question. I still can't work out whether i will need the due_can.h library or whether this is bypassed by the other libraries!
I know that the Actisense NMEA readrer software will correctly read the Due output sent to it down the USB cable, but I haven't worked out whether separate coding is needed to send the same data to the can bus pins.
Need to spend some time looking at the examples I guess!