Meshtastic

Arduino project coded?

Been messing with Arduino coding for quite some time. Also programmed in Python on Raspberry Pi.
So I was expecting an Arduino project .ino file to load for this. I can’t find one. What development software do i need to take a look at the code as an entire project for this?

1 Like

PlatformIO is what you are after.

1 Like

Also this might be helpful: https://github.com/meshtastic/Meshtastic-device/blob/post1/docs/software/build-instructions.md

followed instructions in your doc:
opened the terminal in Visual studio code
typed in>> git submodule update --init --recursive
And it chucked back an error like below.
Thanks geekville. I think i need to go away and learn a bit more about how github works.

PS C:\Users\andre\Downloads\Meshtastic-device-0.9.1\Meshtastic-device-0.9.1> git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git
PS C:\Users\andre\Downloads\Meshtastic-device-0.9.1\Meshtastic-device-0.9.1>

1 Like

Hi, good attempt! It seems you are missing an initial step (which our instructions also missed ;-)).

new step 1: Clone the Meshtastic-device sourcecode from github and cd into the project directory.

git clone https://github.com/meshtastic/Meshtastic-device.git
cd Meshtastic-device


Success!! well nearly, It complied for the wrong board, I have a tbeam. Sorry you, probably have better things to do than nurse me through getting the compiler to work for me. But where do i tell it what board to compile for? This is a new method of compiling from my normal Arduino where i would comment in the correct board to #include

1 Like

the easiest thing in your case I think is just to edit this line in platformio.ini:

default_envs = tbeam 

Ah given up on Visual Studio code. Had it assembling, but for the wrong board. Changed the platform. ini as suggested. but the change would not stick. Messed around with a few settings now all i get is this pop up whenever i try to start debugging. uninstalled the program, re installed it and the same error. It seems i am getting to old and less time to figure this one out. Used so many compilers in the past. But this one is either so simple or so overly complicated that i just don’t have the self teaching skills to have a clue how to use the dam thing. So frustrating.

I feel your pain. I’m sure it is a really powerful tool when you know how to use it! When changes don’t “stick” I sometimes have to click “Rebuild IntelliSense Index” but all this really does is update the coloured and grayed out code I think.
image

I’ve also started a little guide here that would be great to get some more input too.

2 Likes

Sorry, I know this is about Meshtastic. But having real bother with V.S.C . once i load folder Meshtastic-device-post1. Everything loads into V.S.C. pressing F5 (start debugger) then VSC ask to select which environment. Which one do i choose.?As when i select a C++ one it just adds a launch.json with no real details.With arduino it’s just assemble and download to device. I am sure with more use i will understand what VSC is capable of and understand why it is not so straight forward from the start. I just want to download your code from github assemble it and load it into my t-beam. I have downloaded the bin file and loaded that into the device. As a coder of arduino, i really would like to mess with the code. But i just can’t get this simple task of assembling it even, with Visual Studio Code. very fustrating

Is there a reason you are trying to build using the VSC debugger option? Have you tried building through PlatformIO as described here, step 8?

Ah yes, that’s how i did it from the beginning. However that method no longer works, as PIO RUN is not recognised. From research, Seems it has something to do with I have python 3 and not 2 installed. Strange how it all worked before. So stuck again now. Life really should not be this hard. Really would like to stick with Arduino, as this is all a bit of a head ache learning curve.