DanKline 0 Posted November 19, 2015 Share Posted November 19, 2015 I'm working with the CC3200XL and the Grove starter kit. It contains a PIR sensor. When I try to run the sample, it complains about a missing file. I can't find the file anywhere and don't even understand why Energia is looking for it. But what I need to know is, where can I find the source and header for the file. java.io.FileNotFoundException: C:\Users\Dan\AppData\Local\Temp\build5629486675398969734.tmp\pir_motion_sensor.cpp (The system cannot find the path specified) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at processing.app.preproc.PdePreprocessor.writePrefix(PdePreprocessor.java:142) at processing.app.Sketch.preprocess(Sketch.java:1430) at processing.app.Sketch.preprocess(Sketch.java:1345) at processing.app.Sketch.build(Sketch.java:1624) at processing.app.Sketch.exportApplet(Sketch.java:1655) at processing.app.Sketch.exportApplet(Sketch.java:1641) at processing.app.Editor$DefaultExportHandler.run(Editor.java:2521) at java.lang.Thread.run(Thread.java:619)processing.app.debug.RunnerException: Build folder disappeared or could not be written at processing.app.Sketch.preprocess(Sketch.java:1437) at processing.app.Sketch.preprocess(Sketch.java:1345) at processing.app.Sketch.build(Sketch.java:1624) at processing.app.Sketch.exportApplet(Sketch.java:1655) at processing.app.Sketch.exportApplet(Sketch.java:1641) at processing.app.Editor$DefaultExportHandler.run(Editor.java:2521) at java.lang.Thread.run(Thread.java:619) Here's the example file: /* Grove PIR Motion Sensor (Passive Infrared) The following sketch demonstrates a simple application of sensing motion. When someone moves in the sensor's detecting range, it will output HIGH through its SIG pin and the LED will turn on. Otherwise, it will output LOW. Then you can use it to detect the motion of people. The circuit: * Grove PIR Motion Sensor attached to Pin 7 (J12 plug on Grove Base BoosterPack) * Note: Position the Motion Sensor's jumper on N_Retrig to ensure the light stays on while motion is present This example code is in the public domain. http://www.seeedstudio.com/depot/Grove-PIR-Motion-Sensor-p-802.html */ /* Macro Define */#define PIR_MOTION_SENSOR 7 /* sig pin of the PIR sensor */#define LED RED_LED /* LED */ /* the setup() method runs once, when the sketch starts */void setup(){ pinMode(PIR_MOTION_SENSOR, INPUT); /* declare the sig pin as an INPUT */ pinMode(LED, OUTPUT); /* declare the LED pin as an OUTPUT */ digitalWrite(LED, LOW);} /* the loop() method runs over and over again */void loop(){ if(isMotionDetected()) { digitalWrite(LED, HIGH); /* if we detect movement, turn on the LED */ } else { digitalWrite(LED, LOW); /* no movement, turn off the light */ }} /* check if motion has been detected */boolean isMotionDetected(){ int sensor_val = digitalRead(PIR_MOTION_SENSOR); /* read sig pin */ if(sensor_val == HIGH) { return true; /* motion detected */ } else { return false; /* no motion detected */ }} Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.