-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensor integration #1
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,150 @@ | |||
#include <Wire.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need to duplicate the whole file - git does version history tracking for you, and it is bad style to clutter the repository with multiple versions of essentially the same code. Instead it is better to have a single copy and use C preprocessor macros to allow for easy toggling between build versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I was being stupid and made a whole new .ino file to start making edits on. I'll consolidate the changes for a push request on master or that other branch you made for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch is fine, you already made a pull request. Just merge the files and make another commit on this branch.
#define LED 10 | ||
#define LED BUILTIN_SDCARD //use BUILTIN_SDCARD for Teensy 3.6 | ||
//also change line ~46 to: | ||
//if (!SD.begin(BUILTIN_SDCARD)) { TELEMETRY_SERIAL.println(F("SD err")); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unclear comment - this change seems to have already been made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the LED pin only used to blink when there is an error? I think I previously put BUILTIN_SDCARD there but I don't think that makes any sense. I just wanted to see if you concur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so? I didn't write this code. The param passed to SD.begin()
is the chip select, which should definitely not be the same as the LED.
#include <Adafruit_Sensor.h> | ||
#include <Adafruit_BNO055.h> | ||
#include <avr/pgmspace.h> | ||
#include "Adafruit_BMP3XX.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style note - better to use <> instead of "" in #include
, unless including a file in the same directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
imu::Vector<3> magnetometer = bno.getVector(Adafruit_BNO055::VECTOR_MAGNETOMETER); | ||
int8_t temp = bno.getTemp(); | ||
|
||
int8_t BMPtemp= bmp.temperature; //in C, do I need int8_t type???? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style note: variables should be named lowercase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the type, you need to check the library. In this case it appears they should be float
s (or double
s), otherwise you are losing a lot of precision.
https://github.com/adafruit/Adafruit_BMP3XX/blob/master/Adafruit_BMP3XX.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does choosing one or the other take up more bandwidth in the transmitting part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gets sent as text right now, so only marginally. I've been meaning to redo the packet wire format to be more compact, but haven't gotten around to it yet.
-Defined PYRO Channel Pins -Defined Apogee triggering -reworked apogee trigger conditions -worked on falltimer and associated code
Fixed vbatt1 calculation. Also touched up downlink and logging for variables
I can't get the DS1307 Lib ("RTClib.h") to work with the Teensy 3.6 board... Teensy 3.6 has a built in RTC- use TimeLib.h and the TimeTeensy3 example sketch
added many things from our current static test driver .ino to make this one have similar button, timing, and value sending capabilities
-will test %f vs %d for READ_FIELD's to see if the values update properly w/ GUI -more values sent for debugging purposes -reworked apogee detection
updated states, state sending, apogee detection code, other fixes, also added MATLAB UI capability (TBD)
tweaks on test site that worked to give proper state updates and telemetry
now sends gps_e and gps_n so that a live xy from launch point can be plotted fixed states so that the UI buttons work most of the time
No description provided.