This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Configuring SPI MCP3008
#1
I have finished an analog sensor hat for my growing openplotter setup and connected it. Now i wonder how to configure the analog inputs. Reading the documentation i see that it is possible to scale and delinearize the input values but how do i activate the inputs at the SPI tab and make them visible in Signal K?

Appreciate any help you can give!

/Mike
Reply
#2
i may be wrong but i think the new hat took over spi, i desoldered my MCP3008..couldn't get it to work.
Reply
#3
(2018-04-04, 08:24 PM)jim321 Wrote: i may be wrong but i think the new hat took over spi, i desoldered my MCP3008..couldn't get it to work.

Jim, thanks for responding!

New hat?

SPI tab has been around for a while...

/M
Reply
#4
http://forum.openmarine.net/showthread.php?tid=868
spi worked then stopped after one of the updates
http://forum.openmarine.net/showthread.p...hlight=spi
might be of interest
http://forum.openmarine.net/showthread.php?tid=1097
Reply
#5
(2018-04-05, 11:57 AM)jim321 Wrote: http://forum.openmarine.net/showthread.php?tid=868
spi worked then stopped after one of the updates
http://forum.openmarine.net/showthread.p...hlight=spi
might be of interest
http://forum.openmarine.net/showthread.php?tid=1097

Ok, thanks for the good and most relevant information Jim. The hats looks very nice and of course that is the way i will go.  

Anyway, meanwhile maybe we should add a line in the doc's to avoid people spending time and money to get it to work as it is written today.

BR and happy sailing!
Reply
#6
(2018-04-06, 11:02 AM)Smartell Wrote:
(2018-04-05, 11:57 AM)jim321 Wrote: http://forum.openmarine.net/showthread.php?tid=868
spi worked then stopped after one of the updates
http://forum.openmarine.net/showthread.p...hlight=spi
might be of interest
http://forum.openmarine.net/showthread.php?tid=1097

Ok, thanks for the good and most relevant information Jim. The hats looks very nice and of course that is the way i will go.  

Anyway, meanwhile maybe we should add a line in the doc's to avoid people spending time and money to get it to work as it is written today.

BR and happy sailing!

Does this mean we are locked in to Using the Moitessier hat vice playing with various sensors to get openplotter working on the PI
Reply
#7
no you can setup sensors without the hat
i have an arduino with firmata for my sensors.
ads1115 also works for analog "I2C".
i think the MCP3008 "SPI" was fixed in the latest release..
Reply
#8
(2019-03-24, 12:49 PM)jim321 Wrote: no you can setup sensors without the hat
i have an arduino with firmata for my sensors.
ads1115 also works for analog "I2C".
i think the MCP3008 "SPI" was fixed in the latest release..


No, there’s no selecting the SPI channel to modify the values.
Reply
#9
ok i haven't used the spi in this version.
i'll dig out my MCP3008 and breadboard and give it a look.
give me about a week and i'll see if i can get it working...
maybe one of the dev's can add something to this thread..

the ads1115 works really well and is easier to use imo..

i did kinda have it working once.Smile
http://forum.openmarine.net/attachment.php?aid=160
Reply
#10
In openplotter MCP3008 uses CS1 not CS0.
You can change it in the code. File "read_sensors_d.py" exchange  "spi.open(0,1)" to "spi.open(0,0)". (line 437)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)