I’ve been tinkering around with an Electron for a few months. I have the GPS Asset Tracker shield and am trying to follow @Dave’s GitHub project for the Fancy Asset Tracker. I’m familiar with Ardunio’s, but feeling a little overwhelmed at the level of CLI knowledge this seems to require. I’ve tried downloading all the necessary libraries into my project folder, but get a slew of error messages along the way.
Can anyone give me some encouragement as to how to get the GitHub repo downloaded and onto the device? Thanks a bunch in advance.
You should clone the repo first to a suitable location:
git clone https://github.com/dmiddlecamp/fancy-asset-tracker
It looks like the
flash.sh scripts take care of switching, building and flashing examples.
Thanks for the prompt response @nrobinson2000. Still a little lost on the build and flash components. I see the scripts, but do I need to edit them to point to the correct example? Feel like I’m 90% of the was through understanding. Just searching for a breakthrough
Sorry about the lack of documentation, when you’re ready to build, you can run the build script and add the folder you want to compile, for example:
particle flash YOUR_DEVICE motion-tracker-pro.bin
Thanks @Dave. I think I’m learning a ton this afternoon. First time working with a development on any board via the command line. I’ve saved the GitHub repo to /Particle/projects. I’m just getting a ton of “No File or Directory exists” errors.
I know this is very basic and elementary stuff, just can’t crack it.
You should be in the root of the project directory when building. Alternatively, you can just copy all the project and lib files into a folder and compile that folder. The build script is trying to do just that:
# there's a place for us
# remove any previous builds
rm `basename $1`.bin
cp $1/*.* temp_build
# copy over my favorite stuff
cp gps-library/*.h temp_build
cp gps-library/*.cpp temp_build
# try to compile it with the CLI
particle compile electron temp_build --saveTo `basename $1`.bin
Try doing these steps line by line on the command line, and see where things go wrong. Maybe you’re not in the right terminal environment, or things aren’t checked out, or you’re missing some piece?
that’s a bash script as well, are you running on linux? (or the new windows bash shell)
Thanks @Dave! Figured it out! I was just getting kind of funky with the directories. Went back to square one and successfully complied and upload.
@marshall, Mac so yes.