-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Update Adafruit_BME280 to latest, add Adafruit_BusIO #2407
Conversation
@Vity01 Can you check this PR please? |
@slaff what's the proper way to test it? To apply the patch locally or shall I checkout/switch into develop branch locally? |
You can use the following commands:
After that go to your application that is using
You should have now the newer Adafruit_BME280 library and can test it from here. |
@Vity01 I'll add a sample to test this library shortly. It'll build, perhaps you could debug/test it? |
@mikee47 yes
|
Make sure to CD to your application :) |
@Vity01 Run |
Hint: As the sample doesn't require networking you can speed up build times using |
Playing with branches and submodules is a game which I never win.
also |
OK, brute force |
Also worth checking you have a clean working area with |
It's completely broken
|
Not entirely sure what's going on here:
If I run Anyway, this problem is with the documentation build which isn't required. To avoid getting side-tracked use Hint: You can get descriptions of all these various build targets using |
I get newer version
I will try to play with the clean targets, but I think the problem is related to Windows + Awk. |
I would recommend trying out vscode with WSL2, it's a much better experience on Windows. https://sming.readthedocs.io/en/stable/getting-started/windows/wsl.html |
See https://sming.readthedocs.io/en/stable/tools/vscode.html for vscode setup |
@mikee47 I tried to install Sming to WSL, but it's ending with errors...
There is no such path, I don't know if there is something missing or it should use a different path...(there are esp-idf-4.3, esp-quick-toolchain, esp32) Same for VScode , it's possible to call
The tooling is a big Sming problem, since my first experiments 3 years ago... |
Two critical environment variables need to be made available for vscode. There's a hint in the Edit
You'll need to restart vscode but then it should pick them up. From your project directory, run |
@mikee47 The build on Windows is failing. Can you check the compilation errors? |
BusIO calls `Wire.begin()` so if pins have already been set must not be changed back to defaults. Default pins depend on selected architecture so ensure those values aren't overridden.
3814fb5
to
1cee01c
Compare
Current status:
Suggestion for the example - could you add a comment for users how to work with another sensor address
Good job @mikee47 👍 . Windows related problems: - requires new issues..Invoking build from the VSCode is not working
The problem lies in project.mk
Some VSCode magic sets
There should be |
@@ -0,0 +1,151 @@ | |||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
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.
maybe IDE project files should not be included
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.
@slaff Now we have make ide-eclipse
these could all be removed perhaps...
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.
@slaff Now we have make ide-eclipse these could all be removed perhaps...
Yes, I agree. May be we can leave just the Sming Framework .[c]project files. Of course such a change should be a separate PR with update to the documentation too related to this change.
Wire.pins(SDA, SCL); | ||
#endif | ||
|
||
if(!bme.begin()) { |
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.
suggestion add this comment to the line, it can help beginners to discover this possibility
if(!bme.begin() { // if(!bme.begin(0x76, &Wire)) if you need a specific address
@Vity01 The problem with make occurs when running under powershell. This is the default shell for vscode running under Windows. (I tend to avoid powershell and have mine set to cmd.exe.) For some reason the MAKE variable isn't constructed correctly. Try
This affects recursive use of make. Probably an issue with this particular version of make, but it's easily fixed by removing the prefix (which corresponds to $(CURDIR)/. |
cb84662
to
59f4770
Compare
Re. internal compiler crash error this happens when running |
I can confirm the MAKE_COMMAND variable mess: For VSCode - even the Terminal is set to cmd.exe in the VSCode settings, it still launches the powershell, I found a workaround.
There is some discussion https://stackoverflow.com/questions/69047142/vscode-is-suddenly-defaulting-to-powershell-for-integrated-terminal-and-tasks now the |
Excellent find! Yes, the same setting can be added to |
Although my feeling is that there is no good excuse for not being able to run the build from powershell, if that is what the user prefers. Instead of modifying the template I'll add a note to the documentation. |
I agree the PShell should work, but fixing it is another level of complexity and another step for Sming users. I would recommend to update the |
@mikee47 Is also this PR ready for merging? |
@slaff Yes, ready. |
I don't have any hardware to test this, but builds OK.
todo:
Adafruit_Sensor
to latestAdafruit_BusIO
library and patch to build for other Sming architecturesTwoWire
behaviour -begin()
should not change configured pins