Your first attempt: var wlan = require("CC3000").connect(SPI1, B6, B7, B8);
Seems like the correct one - but did you set up SPI1 beforehand? You'd need to use SPI1.setup({ mosi: .., sck: ..., miso:.., baud:1000000, mode:1) to make sure it's working on the right pins and in the correct mode (CC3000 seems to use a different SPI mode to normal for some reason).
Unfortunately the software TI provides for their module is awful - if you initialise it with the wrong information, it just crashes and never returns (rather than erroring).
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Your first attempt:
var wlan = require("CC3000").connect(SPI1, B6, B7, B8);
Seems like the correct one - but did you set up SPI1 beforehand? You'd need to use
SPI1.setup({ mosi: .., sck: ..., miso:.., baud:1000000, mode:1)
to make sure it's working on the right pins and in the correct mode (CC3000 seems to use a different SPI mode to normal for some reason).Unfortunately the software TI provides for their module is awful - if you initialise it with the wrong information, it just crashes and never returns (rather than erroring).