looking at the Arduino code below it looks like it’s an A socket…
const int ledPin = 12; // the number of the LED pin
const int thresholdvalue=400;//The threshold to turn the led on
void setup() {
pinMode(ledPin, OUTPUT);
}
void loop() {
int sensorValue = analogRead(A0);//use A0 to read the electrical signal
if(sensorValue>thresholdvalue)
digitalWrite(ledPin,HIGH);//if the value read from A0 is larger than 400,then light the LED
delay(200);
digitalWrite(ledPin,LOW);
}
What socket are you plugged into on the GroveExpansion board? Try making sure you’re plugged into one of the pure “GPIO” sockets and not a “GPIO/UART”. It may be that they are looking for something plugged into one of the UART sockets and have a bug that is forcing a “K” (UART) socket on the mainboard in that case. I don’t have any Grove equipment, so this is just a guess.
Had to switch over to a Hydra Board as all my Spiders are busy running projects right now.
So with nothing plugged into the grove board and no code setting anything up (ie just the generated code), if I plug into socket 6 (K Socket), no problems, however if I plug into socket 14 (A Socket):
An unhandled exception of type ‘Gadgeteer.Socket.InvalidSocketException’ occurred in Gadgeteer.dll
Additional information: Module GroveExpansion cannot use socket 14 because it requires a socket supporting type ‘K’
Makes sense. They apparently can’t tell which sockets on the GroveExpansion module you’re using, so they’re requiring that you use a “K” socket because it covers all the bases
OK I’ve had some success with a new driver as apparently the old one was pretty much junk (I’m starting to think the hardware geeks equivalent of ‘if it compiles, ship it’, is ‘if the led lights up, ship it’ or perhaps that is just Seeed’s rule) Now I’m not going to claim that the readings make any sense as sometimes they don’t, but at least I have something running which is a start.
The new driver looks pretty much exactly like the eblock expansion module driver, strangely enough
Once I test this out some more I’ll post a sample project in Codeshare.
I’ve now have this working with a Cerberus board (running 4.2 of course), and I’ll try to build an installer etc for the grove extension module.
I’m loving that little Cerberus mainboard. I’m will definitely be picking up some more of those.
I’ve got a:
Error 1 The “Candle” task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\WixTasks.dll. Could not load file or assembly ‘file:///C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\WixTasks.dll’ or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Users\Blake\documents\visual studio 2010\Projects\CerberusAirSensor\GroveExpansion\GroveExpansion\GroveExpansion.csproj 93 5 GroveExpansion
problem which is messing up my release build, so guess what I’m looking at tonight.