some understanding problems with teensy 3.6

Status
Not open for further replies.

AdmiralCrunch

Well-known member
Hi

after a long pause I want to make make a new, a bigger project.. therefor i have bought a new teensy3.6.. (i used a 3.2 before)

on teensy3.2 I have the VIN (5V) pin .. on theensy3.6 I only have 3.3V .. how do I get 5V?


a second question is about coding.. I would like to have clean code this time and therefor I would like to code classes.. how would I organize the files? I mean, when I include a myClass.h .. how does the compiler know, where the file is?
(I would like to organize my classes in subfolders of my project-folder)
 
The T3.6 has the same VIN pin as the 3.2 does... They are often used to power the board and can handle the range of something like 3.6 to 6v. If the board is connected to USB and you have not cut the VIN/VUSB jumper on the bottom of the board, this pin will have the USB voltage of something around 5V.

Organizing code. Often depends on if you are using Arduino or not... Assuming Arduino.

You can start off with all of the source files in the sketch folder. Can be .ino files as well as .h and .cpp files. They will all show up as tabs in the Arduino IDE.

You can setup to have some of your code as to be libraries, in the same way that the ili9341_t3 is a library. There are fixed locations where libraries are installed. Some specific locations associated with specific hardware and the default library location, which is: <where your sketch folders are>/libraries/<your libraries>.

How the Arduino IDE finds them: It searches through all of the libraries in the standard locations, looking for any #include <somelibrary.h> that your sketch uses directly or indirectly, until it finds it. If you include some header file with some generic name, like:
#include <arialfont.h> which is included in multiple different libraries it may choose a random one. If you have the same library installed in a couple of places, there are rules on which one it chooses, things like does the library.properties file and if so does it specify an architectures line which is compatible... By default the system will choose a user library (like I mentioned above) over ones that are stored as part of a hardware install. In cases like this the compiler will tell you that it is using the library X and not the library Y...

Now if you are not using Arduino, but using makefiles or the like. Than you need to setup the makefile to know where these files are...
 
Status
Not open for further replies.
Back
Top