QUB-ASL / bzzz

Quadcopter with ESP32 and RaspberryPi
MIT License
7 stars 0 forks source link

Interface the barometer #174

Closed Runway27 closed 4 months ago

Runway27 commented 5 months ago

Main Changes

This change creates a thread and the data from the barometer is collected. The resulting data is logged into a CSV file

Associated Issues

Tests

The Python code was run and the data was logged into the CSV file. It has been tested on the Raspberry Pi, it is yet to be tested on the quadcopter

alphaville commented 5 months ago

@Runway27 In the PR description, under "associated issues" you've linked to another PR. You should link to the corresponding issue(s).

Runway27 commented 5 months ago

Thank you, sir. I will implement these changes tomorrow, as it would be easier to do them while rechecking its functionality on the Raspberry Pi

Runway27 commented 5 months ago

Any suggestions on what the default window size and the filter should be?

alphaville commented 5 months ago

Any suggestions on what the default window size and the filter should be?

I'd say 3 should be fine

Runway27 commented 5 months ago

Any suggestions on what the default window size and the filter should be?

I'd say 3 should be fine

Ok sir, which filter should I use?

alphaville commented 5 months ago

@Runway27 do we have any updates on this?

Runway27 commented 5 months ago

Sir, I will be completing this by Friday. I have to fix the indexing and remove redundant functions.

alphaville commented 5 months ago

Sir, I will be completing this by Friday. I have to fix the indexing and remove redundant functions.

Great! Invite us to do a review once you push your updates.

Runway27 commented 5 months ago

Sir, I have created a new temporary file called "test.py" for the pressure sensor. The style of the code is very similar to that of the anemometer. The "run()" function executes automatically when ".start()" is invoked. Since ".start()" has been removed, no values are being written into the csv file. I'm unsure how to get rid of this function. Could you please help me with the same?

alphaville commented 5 months ago

@Runway27 .start is still in your constructor; see line 61. This line starts the thread that runs in the background. Are you able to print any values? Will you be in the lab at 14:00 today?

Runway27 commented 5 months ago

@Runway27 .start is still in your constructor; see line 61. This line starts the thread that runs in the background. Are you able to print any values? Will you be in the lab at 14:00 today?

No sir, the values are not being written into the csv file. Sir I have a class from 14:00 to 16:00 today.

Runway27 commented 5 months ago

@Runway27 .start is still in your constructor; see line 61. This line starts the thread that runs in the background. Are you able to print any values? Will you be in the lab at 14:00 today?

The pressure and altitude values are getting calculated. But def run(): commands aren’t being executed. So I plan to get rid of that function itself.

Runway27 commented 5 months ago

@alphaville sir, I have got rid of the run file. test.py is very similar to the anemometer code.

alphaville commented 5 months ago

@alphaville sir, I have got rid of the run file. test.py is very similar to the anemometer code.

@Runway27 and does it work?

Runway27 commented 5 months ago

@alphaville sir, I have got rid of the run file. test.py is very similar to the anemometer code.

@Runway27 and does it work?

Yes sir.

alphaville commented 5 months ago

So if test.py works just rename it and we can do a quick review and merge it

Runway27 commented 4 months ago

Sir test.py has been removed and all the contents have been overwritten to pressure_sensor.py. The final testing was done for 10 minutes and it works.

alphaville commented 4 months ago

@Runway27 when you're ready you can merge this, unless you are planning to make any changes.