Posts: 4
Threads: 1
Joined: May 2019
Reputation:
0
I'm trying to build the weather sensor in the "arduino" section. Being fairly green at compiling code I can't resolve a complie error in the IDE.
Running the compiler I get "~\arduino\weathersensors\weathersensors.ino:34:19: fatal error: twi.h: No such file or directory
#include <twi.h>"
I'm sure it's the line 33
"extern "C" {
#include <twi.h>
}"
Snooping through othere files I saw a comment that the built-in twi.h in the arduino wire library doesn't do a required pull-up needed.
That's where the greenneess takes over. Where is it lookng for this file and how do I go about installing all the dependancies required? I ran the makefile (another foggy area) but that didn't resolve the issue.
Thanks for any help.
DanO
There are 10 types of people, those that understand binary and those that don't!
Posts: 2,210
Threads: 20
Joined: Jun 2016
Reputation:
65
it should be checked into the repository. So I recommend you try running "make" from the command line for the weather sensors so they can use the right twi.
I gave up on the arduino ide years ago.
Sean
Posts: 580
Threads: 65
Joined: Nov 2016
Reputation:
21
If you have the library as a zip file, go to Sketch - Include Library - Add ZIP Library... and load the zip file. It will be put in your sketchbook/libraries folder and can be used with the #include <whatever> syntax. If your include file is in the same directory as your source code, you would use the #include "whatever" syntax. You can open a new tab in the Arduino IDE and cut/paste your include file there, which is particularly useful if you intend to do modifications to that code. You would use #include "whatever" for that, and the include file will be saved in the same folder as your source code.
You don't have to use the Add Zip Library... menu to add libraries. It is also okay to just unzip the new libraries into your sketchbook/libraries folder and restart the Arduino IDE.
While I continue to use the Arduino IDE, I agree with Sean that for really advanced stuff the Arduino IDE leaves a lot to be desired. For your weather station, I'm sure it'll be fine. The next step to another IDE is a BIG step, particularly if you are on a steep learning curve.
Andy
Posts: 4
Threads: 1
Joined: May 2019
Reputation:
0
2019-05-22, 02:16 PM
(This post was last modified: 2019-05-22, 02:23 PM by svBlueMoon.)
Dumping the IDE gets me past the twi issuse but running make stops with "No rule to make target 'font.ttf' , needed by 'charset.h' . Stop."
What am I missing now? The file isn't in the pypilot files downloaded and I don't see anything that builds it.
Thanks guys for all your help/guidance.
(2019-05-19, 02:10 PM)abarrow Wrote: If you have the library as a zip file, go to Sketch - Include Library - Add ZIP Library... and load the zip file. It will be put in your sketchbook/libraries folder and can be used with the #include <whatever> syntax. If your include file is in the same directory as your source code, you would use the #include "whatever" syntax. You can open a new tab in the Arduino IDE and cut/paste your include file there, which is particularly useful if you intend to do modifications to that code. You would use #include "whatever" for that, and the include file will be saved in the same folder as your source code.
You don't have to use the Add Zip Library... menu to add libraries. It is also okay to just unzip the new libraries into your sketchbook/libraries folder and restart the Arduino IDE.
While I continue to use the Arduino IDE, I agree with Sean that for really advanced stuff the Arduino IDE leaves a lot to be desired. For your weather station, I'm sure it'll be fine. The next step to another IDE is a BIG step, particularly if you are on a steep learning curve.
Andy
It's a steep learning curve while standing on the shoulders of giants, but a freaking vertical wall when I get down!
There are 10 types of people, those that understand binary and those that don't!
Posts: 4
Threads: 1
Joined: May 2019
Reputation:
0
(2019-05-28, 12:02 AM)seandepagnier Wrote: The data repository contains font.ttf used.
https://github.com/pypilot/pypilot_data
Thanks Sean,
"Make" ran without errors but didn't upload to the arduino.... (checked and it was the correct USB port???)
That's fine I'll figure that out as I continue to wean myself off MS Windows.
I did get the hex file though and used another utility to write it to the nano. I have a functoning wind instrument now just needs to be strappen on the mast.
Thanks again.
DanO
There are 10 types of people, those that understand binary and those that don't!
Posts: 1
Threads: 0
Joined: Jul 2021
Reputation:
0
I'm trying to update the weathersensors.ino code to interface with an HC-12 transceiver.
I'm having the same issue - unable to find twi.h.
I tried running make from the weathersensors directory and got
make: *** No rule to make target `/usr/share/arduino/libraries/Wire/Wire.o', needed by `weathersensors.cpp.elf'. Stop.
I also tried copying the twi.c code into a new tab, but got an error because my working directory already contains the twi.c code.
Note that I only copied the weathersensors directory from the pypilot-master.
This is with a fresh Arduino install with minimal external libraries installed. Some research suggests that twi.h may be included in some external libraries? It's not in the pypilot library on github.
Any other suggestions?
Mac OS Big Sur 11.4.
Posts: 2,210
Threads: 20
Joined: Jun 2016
Reputation:
65
2021-07-26, 04:28 AM
(This post was last modified: 2021-07-26, 04:29 AM by seandepagnier.)
I had to modify twi slightly which is the reason I could not include it from external sources
You may need to update the makefile or create a symlink to point /usr/share/arduino to your arduino install