A newbie that needs help
-
@Leonard-Stroman Yup, you will be using git CMD. This will allow you to download the C/C++ library to interact with the PWM Expansion. You can find resources about programming using C++ here: http://www.cplusplus.com.
-
(1)Should I ssh or serial or console with the omega while git cmd is up and running?
(2) what do I type or do I copy and paste ?
(3) once I received the information for GitHub through git, what do I do with it?
Should it go straight to the omega or is it a file on my computer that i must then load on the omega?Thanks you so much for your help and product....
Ok, I understand that you have a lot going on and I also realize that it's not your job to hold someone hand through the process of creating whatever their desire are with the onion omega.
But when I say step by step I mean the whole abc's of this path of IoT.
You see I brought this, with the hope of learning but with a curve to it, a few short cuts.
Let me put it to you like this, I have no idea what I'm doing, all I know is I have a creation in my head and I'm doing my best to build it.
-
@Leonard-Stroman The
git
command isn't run on the Omega, but on your computer which will be compiling the software for the Omega. First, you will need to set up a Cross compile environment. You will need a Linux computer running an operating system such as Ubuntu or CentOS, and you should follow this guide to setup the cross compile environment: https://wiki.onion.io/tutorials/cross-compile. Then, on the Linux machine, you should rungit clone https://github.com/OnionIoT/i2c-exp-driver
, this will download the library that you need to write the software. Next, you will need to write the software to use the library to control the servo motors. The program should accept an input (either from command line or from some API calls), and translate that to a motor position, which you will then use thei2c-exp-driver
to send to the PWM expansion. Finally, you will need to compile the program in the cross-compile environment you have setup. Here is a guide that shows you how to create and compile a package: https://wiki.openwrt.org/doc/devel/packages. You will need to familiarized yourself with makefile syntax so that you can create the makefile that tells the compile how to turn your program into its binary form.
-
Man, you are the best!! I will spend the night working on this ...
Thank you , time to go learn something !!!
-
Can I use a raspberry pi ?
-
@Leonard-Stroman You can use the Raspberry if it has enough storage. However, compilation on the Raspberry Pi might be very slow due to its limited resources. Be prepared to spend up to 24 hours to compile the toolchain alone! Compilation of the actual packages should be much more manageable.
-
Hello,
Step 6b: Compile Individual Packages , what is the package name? In the setting up cross-compile environment of Omega....Can somebody push me in the right direction, I'm sitting here at a stalemate!
-
Hi @Leonard-Stroman, the name of the package is the package that you are creating. Unless you are trying to compile another open source project that's been written for OpenWRT/Omega. Did you write a software in C/C++ that you would like to compile?
-
All I'm doing is what you told me to do earlier in this post . Im at step 6b: Compile Individual Packages, ,,, make tool/install (done), ,,,,,make toolchain/install (done)
I'm at make package /<package name>/ compile ,,,,, what is the package name?
-
Hi @Leonard-Stroman, the package name is defined by you. You will need to write that package in C/C++ and also define the Makefile so that the cross-compiler will know how to compile your code into binary.
-
Ok, if I have already named the package, I'm not aware when or what I named it ...
And if I have to name it now, how do I go about doing it ?
-
Hi @Leonard-Stroman, sorry about the confusion, I might have been unclear. It's not a package that you have defined previously. It is something that you need to create before you start the cross-compile process. Cross-compile simply converts the code which you have written into the binary that allows you to run on the Omega. But you will have to write the code to tell the Omega what you want it to do.
Does that make sense?
-
Ok, how do I write the code for the cross compiler to then transfer into binary for the onion omega ?
I've done coding with raspberry pi and arduino, but that was code that was already written?With the omega do I have to write the whole code from beginning to end or is there a cheat sheet that allow me to just fill in the blanks ?
Either way where do I begin?
-
@Leonard-Stroman What language did you write the code for Raspberry Pi? Would you be able to put up snippets of the code to give us a sense of what you are trying to get the Omega to do? We will be able to help you better this way.
-
-
@Leonard-Stroman That makes it much easier. Code written in Python don't need to be compiled because it is an interpreted language. You simply need to install
python
on the Omega, copy the code over to the Omega, and it should be able to run. The only thing you will need to wait for is our python wrapper for the PWM expansion driver. We should be releasing that in the next couple of weeks.