I want to write drivers for sensors and not to use the factory's drivers. Where to start?
The device datasheets.
And do what? How do I start?
Read - Understand - Make
For what computer, and what operating system?
...and what sensors? Please read:
This sensor: Adafruit FONA - Mini Cellular GSM Breakout uFL Version : ID 1946 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits for Windows 10.
It has a serial AT command interface. So your driver would be just a bunch of methods (functions) to send the correct AT commands to the serial port. Somewhere in the documentation you will find an AT command reference.
There is a specific Adafruot FONA library (bit driver) which you should be able to search, download l, install and #include for your project.
Thank you, but I want to build my own library....that's why I open the current thread and I ask...
There are some tutorials on format for Libraries too , google will find them
I would start by examining the Adafruit FONA library on Github, to see how they did it.
Then, after noting that it has over 3000 lines of code, I'd be highly inclined to chose a different "sensor" to write my first "driver" for.
Assuming you mean non analog output sensors (which need no driver)
The first think to do is to read and understand the datasheet.
It will provide:
- a list of all the functions and registers.
- timing for reading and writing to the sensor.
Since you asked "where do I start" twice I'll assume you are a novice. If this is the case I would suggest you pick a sensor you would want to write you code for and get a driver already offered and follow the above bullet points and look at the code to see how others do it.
Does this need 5Volt or I need 12 Volt supply to the Arduino? Overview | Adafruit FONA 808 Cellular + GPS Shield for Arduino | Adafruit Learning System
Read the "Overview" section there. It answers power questions in detail.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.