This is an open call to any one who has been able to get code working using the user code hooks. HELP!i am trying to get a simple script running that sets pin8 high when its hits a waypoint. i know where i need to call the script and i know where it needs to be placed but im falling down at how to get the APM_config.h working with the UserCode and the UserVaribales.In APM_Config i have:#define CAMERA_TRIGGER_ON_WAYPOINT camera_trigger_on_waypoint();#define CAMERA_TRIGGER 1#define CAMERA_PIN 8#define pinMode(CAMERA_PIN,OUTPUT):then in UserCode i have:#ifdef CAMERA_TRIGGER_ON_WAYPOINTvoid camera_trigger_on_waypoint(){digitalWrite(CAMERA_PIN,HIGH);}#endifand in UserVariables i have#if CAMERA_TRIGGER == 1pinMode(CAMERA_PIN,OUTPUT);#endifThe error that i get is saying that digitalWrite is out of scope.Thanks for any help
You need to be a member of diydrones to add comments!
adam bazley > Shyam BalasubramanianMay 15, 2014 at 6:10pm
Sorry forgot to add my email to the last reply, A.bazley@gmail.com.
adam bazley > Shyam BalasubramanianMay 15, 2014 at 5:38pm
there is a UserCode.h ? i thought that there was a UserCode.pde and a UserVariables.h
would you be able to email me the code files for your camera trigger so that i can use it as a base for mine?
I know that its better practise to figure it all out your self but my project is due in 4 weeks and this is the last component i need before i can start the testing.
Replies
Sorry forgot to add my email to the last reply, A.bazley@gmail.com.
there is a UserCode.h ? i thought that there was a UserCode.pde and a UserVariables.h
would you be able to email me the code files for your camera trigger so that i can use it as a base for mine?
I know that its better practise to figure it all out your self but my project is due in 4 weeks and this is the last component i need before i can start the testing.
Cheers
Adam