Total Novice wants to build atmospheric sensor

Status
Not open for further replies.
Greetings,

Am prowling through the PJRC site and see what looks like a great base for developing our own low cost atmospheric sensors. The Teensy LC seems like a good platform to start with. Plan to communicate with the board from Windows.

Here is what we want to do:

1) measure Temperature, Pressure, RH (Adafruit), PM2.5 (Plantower or Shinyei), Ozone (Alphasense), NO2 (Alphasense)
2) realtime 9600 baud serial data output via a 3.3V serial port
3) store data on SD card
4) optional WiFi capability to remotely read saved data from SD card

Can someone point me toward the parts that will get us started? Also, please offer advice on our ideas above.

Thanks!
 
Learn how to communicate with each sensor, typically via I2C, from its data sheet and the Wire library page. https://www.pjrc.com/teensy/td_libs_Wire.html.

Data logging and wireless are separate issues... don't take on everything at once.

If you are a total novice you might want to start with the basic tutorials before trying to read senor data. https://www.pjrc.com/teensy/tutorial.html

'Novice' can mean 'no programing experience' or just 'new to Arduino' but either way you need to be able to handle the basics.
 
Thanks for the feedback. Personally I have done a lot of device communication coding in the past; just not with Arduino. But I'm working with a high school student who is new to most of this. So the tutorial sounds like a good place to start. Then we'll move onto the sensors of interest. Will send feedback as needed .... Thanks again!
 
Tutorial Problems

Thanks for the feedback. Personally I have done a lot of device communication coding in the past; just not with Arduino. But I'm working with a high school student who is new to most of this. So the tutorial sounds like a good place to start. Then we'll move onto the sensors of interest. Will send feedback as needed .... Thanks again!

So we have the tutorial kits and everything has worked fine up to the point in the tutorial where in tutorial one, the next step is to open examples/digital in the Arduino IDE looking for one called Blink. There is no Blink there but instead "Blink w/o delay". There *is* a blink in the basics list. No matter, both of them when verified produce the same error of:


C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy/core_pins.h:2181:15: error: operator '==' has no left operand

can you help with this?

Thanks!
 
C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy/core_pins.h:2181:15: error: operator '==' has no left operand
You seem to have selected teensy2 and not TeensyLC in your Arduino IDE.
The link should be '….\cores\teensy3/core_pins.h'. (note the 3)
 
You seem to have selected teensy2 and not TeensyLC in your Arduino IDE.
The link should be '….\cores\teensy3/core_pins.h'. (note the 3)

thanks very much for the quick feedback. I switched to Teensy LC but still get similar errors:

***************

In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_pins.h:34:0,

from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:38,

from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/WProgram.h:45,

from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/Arduino.h:6,

from C:\Users\Dave\AppData\Local\Temp\arduino_build_17857\sketch\Blink.ino.cpp:1:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/kinetis.h:764:12: error: operator '==' has no left operand

#if (F_CPU == 256000000)

***************

I found the apparently offending code in kinetic.h and it reads:

************

#endif // end of board-specific definitions

#if (F_CPU == 256000000)
#define F_PLL 256000000
#ifndef F_BUS
#define F_BUS 64000000
//#define F_BUS 128000000 // all the usual overclocking caveats apply...
#endif

*************

More ideas?
 
What version of the Arduino IDE is installed - is this being built from the IDE ? What version of TeensyDuino? It seems like the IDE isn't in use or building right to not have F_CPU defined.
 
What version of the Arduino IDE is installed - is this being built from the IDE ? What version of TeensyDuino? It seems like the IDE isn't in use or building right to not have F_CPU defined.

yes, being built from Arduino IDE 1.8.8. TeensyDuino is 1.45.

I followed the directions in the tutorial for loading things up pretty closely, I think...
 
I switched to Teensy LC, loaded the Blink example and it compiles, without error.
Something is wrong with your installation.
I'd delete all and begin again. - Identifiying the problem takes too much time and is needless. Installing it new it way faster.

0. Delete all, Reboot !!! to make sure nothing is running
1. Install arduino - for example to c:\Arduino
2. Install Teensyduino, when it asks for Arduino, point to c:\Arduino

3. Thats it.

4. Select your Teensy LC / Teensy 3.x, load "Blink" from the Menu Examples / Teensy / Tutorial1
 
...
I'd delete all and begin again. - Identifiying the problem takes too much time and is needless. Installing it new it way faster.

0. Delete all, Reboot !!! to make sure nothing is running
1. Install arduino - for example to c:\Arduino

My only note on #1 Install would be to clarify down load the ZIP install version. … OKAY One more note Step #3.5 below

Unzip to folder of your choice [ note if unzip goes in that folder or a folder in that folder ] - then install TeensyDuino and run from there.

The standard Windows installed version used to give me grief - so I stopped using that.

Step #3.5: Check your Sketchbook Folder and the Libraries folder within that folder as it may have some unwanted or old items.
> I keep my Sketchbook in its own folder outside of any Arduino folders so it isn't affected by anything, and 'libraries' in that folder is where manually installed libraries come from and override other files.
 
Here's what I did:

1. Download arduino-1.8.8-windows.exe from Arduino website
2. Install Arduino to c:\Arduino
3. Download TeensyDuinoInstall.exe
4. Disable Norton Firewall
5. Install TeensyDuino to c:\Arduino
6. Now I’m compiling and running without the errors.

No idea what happened the first time. Except for choosing the c:\Arduino I think I did the same thing before. Oh well, now it works!
 
don’t forget Windows sets permissions in Program Files to read only from the user, where you have to authorize a write to modify files there. This can be adjusted in the control panel’s user options, set it to the lowest value and you won’t get those annoying Admin authorization popups whenever you copy files to a read-only protected folder
 
Status
Not open for further replies.
Back
Top