Skip to main content

I can't create an Arduino library Why are the files not being created correctly?

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but iI can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

and i am also unable to follow the tutorial above can someone give me a easier tutorial on how to create a library

I can't create an Arduino library

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

and i am also unable to follow the tutorial above can someone give me a easier tutorial on how to create a library

Why are the files not being created correctly?

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but I can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

added 118 characters in body
Source Link

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

and i am also unable to follow the tutorial above can someone give me a easier tutorial on how to create a library

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

and i am also unable to follow the tutorial above can someone give me a easier tutorial on how to create a library

Rewrote the question to include only the relevant part
Source Link

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. It doesn't work and its not specific enough so can someone tell me how toWhenever I create a library for arduino or send me a video tutorial for hownew sketch and try to create one i cant found any tutorial anywhere but that one above butsave it doesn't make any sense my code is here

int sensorpin = 5; int target = 0; int targeta = 0; int pin = 1; boolean motionfound = false ; void setup() { pinMode(sensorpin, OUTPUT); delay(1000); } void loop() { motion(); motiontrue(); delay(10); } void motion(){ target = analogRead(sensorpin); delay(75); targeta = analogRead(sensorpin); if(targeta < target) { boolean motionfound = true; } if(targeta > target) { boolean motionfound = true; } if(targeta == target) { boolean motionfound = false; } } void motiontrue(){ if(motionfound == true){ pinMode(pin, OUTPUT); } } 

so how am i meant to convertas .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library if i cant follow that tutorial i cant find any other ones and now no one can tell me how tothis way. How do itI create a new library? What am I missing here?

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. It doesn't work and its not specific enough so can someone tell me how to create a library for arduino or send me a video tutorial for how to create one i cant found any tutorial anywhere but that one above but it doesn't make any sense my code is here

int sensorpin = 5; int target = 0; int targeta = 0; int pin = 1; boolean motionfound = false ; void setup() { pinMode(sensorpin, OUTPUT); delay(1000); } void loop() { motion(); motiontrue(); delay(10); } void motion(){ target = analogRead(sensorpin); delay(75); targeta = analogRead(sensorpin); if(targeta < target) { boolean motionfound = true; } if(targeta > target) { boolean motionfound = true; } if(targeta == target) { boolean motionfound = false; } } void motiontrue(){ if(motionfound == true){ pinMode(pin, OUTPUT); } } 

so how am i meant to convert it to a library if i cant follow that tutorial i cant find any other ones and now no one can tell me how to do it

I have been through http://arduino.cc/en/Hacking/LibraryTutorial but i can't do it. Whenever I create a new sketch and try to save it as .cpp or .h from the Save As button in the Arduino IDE, it gets saved as _cpp and _h. I am not able to create a library this way. How do I create a new library? What am I missing here?

Post Reopened by sachleen
added 151 characters in body
Source Link
Loading
formatted code.
Source Link
sachleen
  • 7.6k
  • 5
  • 40
  • 57
Loading
added 674 characters in body
Source Link
Loading
Post Closed as "Needs details or clarity" by sachleen
deleted 33 characters in body; edited title
Source Link
TheDoctor
  • 3.5k
  • 1
  • 22
  • 39
Loading
Source Link
Loading