openXsensor test version

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

openXsensor test version

Post by rainer »

As mentioned before, i am working on a new version of the oXv called openXsensor.
i did not have the time to create wiki entries or other documentation, but in case you want to give it a try, you can download all the files from here:
https://code.google.com/p/openxvario/so ... penxsensor
this version does not consist of a single code file as the oXv, so you must download all files. the configuration can be changed in the file oxs_config.h
The file to open in the arduino IDE is openxsensor.ino

The new version supports current sensors, a voltage divider and contains a lot of other changes and enhancements like persistent storage of some of the telemetry values like consumed capacity.

rainer.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXsensor test version

Post by jhsa »

Can I suggest that you upload a zip file with all the necessary files inside?? ;)
Then we would only have to download one file :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: openXsensor test version

Post by Kilrah »

But then you lose the advantages of svn :)

Just checkout the code.
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openXsensor test version

Post by ReSt »

Can somebody provide the link that is required for the svn checkout ?

Reinhard
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: openXsensor test version

Post by Kilrah »

Just click on Checkout on the page above, the link will be there :)

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXsensor test version

Post by jhsa »

Kilrah wrote:But then you lose the advantages of svn :)

Just checkout the code.
You didn't understand what I mean..
The idea is to upload all the files plus the zip file with the latest ;)
The same as it is done with the audio module's code

The files are for arduino and the IDE is used to compile it, so you just download the files, modify the config as you like, compile it and flash it. I don't know if we can compile this the same way we compile opentx for example :)
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openXsensor test version

Post by ReSt »

When I go to the above link and there to checkout, I get the informational link of how to download.

But when I enter this link manually (as it can't be copied) into 'svn checkout' as 'URL of repository', I get an error of: URL does not exist'

but when I use http:// openxvario.googlecode.com/svn/branches/openxsensor
I still get the same compile error.


Reinhard
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXsensor test version

Post by rainer »

that compile error refers to some jeti code, which is only in a seperate directory, so i am confused why you should get that error message....
-did you download all the files into a clean directory? the file being refered to "openxvariojeti" is not included in the openxSensor directory on google code... so you must have something got mixed up there
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openXsensor test version

Post by ReSt »

I open a new empty folder
Mouse Right click
Select SVN Checkout
that opens 'Checkout ' window
Set URL of Repository to 'http://openxvario.googlecode.com/svn/branches'
Checkout Depth to 'full Recursive'
uncheck 'Omit externals'
select 'Head Revision'
click 'OK'

That downloads
.svn
openxsensor
openxvario
openxvariojeti
openxvarioplay

When I go into these folders and run the .ino files I'm getting the errors.

Reinhard

edit:corrected sequence of windows
tedbmoss
Posts: 121
Joined: Sun Jul 15, 2012 10:42 pm
Country: -
Location: Peoria, AZ

Re: openXsensor test version

Post by tedbmoss »

Where do you learn how to do this? I downloaded the files through raw files one at a time.
They compile ok in arduno. I put an SVN reader on my win xp but do not know if it is needed or how to use it.
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openXsensor test version

Post by ReSt »

Try on error :mrgreen:

Sometime ago there was a description of how to compile the code. But I don not find it anymore and I also do not remember for which 'product' it was, (Er9x, open9x, Companion) ??

That description stated what programs you had to install and a little bit of how to download a complete set of one of the softwares.

I have some personal modifications for Er9x and OpenR/Tx (NMEA, Templates) so that I always have to compile the fw to fit my wishes/needs.
Since then, I always download the full set of a firmware version when a new one is available. After updating it with my modifications, I'm then able to compile it and run my private version.

This download can easily be done with TortoiseSVN. If you do as described in the above post, and if you have the correct link address, you get everything that belongs the version, downloaded with one click.

Reinhard
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXsensor test version

Post by rainer »

tedbmoss wrote:Where do you learn how to do this? I downloaded the files through raw files one at a time.
They compile ok in arduno. I put an SVN reader on my win xp but do not know if it is needed or how to use it.
in my opinion you only need a SVN client if you want to develop yourself.
In future releases i am probybl going to create a zip file cotaining all files that are located in the openxsensor directory. those are the files you need. Then download and install arduino 1.05 and open the .ino file with it.
from there you can then choose the correct board and compile + upload the program to the arduino board.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

My eyes are slowly glazing over. It started when 'svn' was mentioned, so any easy method of doing things that doesn't require reading through pages of stuff on the Internet, just to get a handle on what this svn compile stuff is about would be a bonus.

Got to remember that we have a lot of Methanol head thumb flyers around that haven't a clue about how to assemble together lumps of firmware. ;)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXsensor test version

Post by rainer »

you managed with the openXvario... so the only difference here is that you have to download all these files here instead of just one .ino file ... ;-)
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

OpenXvario wasn't a problem, apart from having to disable the remote sensitivity setting. :)

So let's see how it goes... You download a stack of (unknown) files, and then you join them together to make one big .ino file that you burn onto the m328 chip.. Hmm.. Hang on... Now what are those files? If they happen to be one bit to do voltage, another to do current and the main one for the pressure sensor, then why not just have it all in one to start with, which will cut out a lot of aggravation for us 'normal' people?
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXsensor test version

Post by rainer »

No, you actually you don't have to join them together to one big file. The .ino file is just the one file that is already there and that you have to open in the arduino IDE. It will include all the files automatically based on the configuration you choose when you compile it.
The new openXsensor is a more modular approach then the openXvario. In the future it will be possible to e.g. change some entries in the config file in order to completely replace the frsky output part against another class that provides telemetry output for a completely different transmitter. For example a jeti telmetry output.
Or you could reconfigure it to leave out the current sensor if you don't need it but add in an air speed class to customize to the requirements you have.
By providing separate files for each of the classes, its easier for new developers to add new classes for new sensor types.
Don't be afraid, they won't bite.
And by the way, there is no programming mode in the new code ;-) .
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXsensor test version

Post by jhsa »

When Rainer makes the zip file, just create a folder somewhere, unzip all the files in there, and open the file with the .ino extension with the arduino IDE.. Then you will see a few tabs. click on the one that says "config.h" (I think ;) ) and you can change configurations there.. just read it well, it explains what you have to do..

when you're happy with the settings, just hit upload with the arduino connected to the computer and the code will be compiled and uploaded..

João
(Methanol head thumb flyer)
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

Thanks for the explanation.. Sorry to say that it makes no sense at all. What zip file? I see no zip file?

Maybe when I get home later I will look at this jumble of files EEPROMAnything.h openxsensor.ino oxs_arduino.cpp oxs_arduino.h oxs_config.h oxs_curr.cpp oxs_curr.h oxs_ms5611.cpp oxs_ms5611.h oxs_out_frsky.cpp oxs_out_frsky.h to see if I can understand half of it. The one I like is EEPROMAnything :)

As to reading. Yup I can do that, but sometimes pictures are so much better. :) The idea of changing things in the config files reminds me of the DOS days when you used to go into it and type a whole bunch of gibberish that only processors or strange people could understand. Ahh.. The good old days. Nice to see that they are still alive and kicking. :) ... Ohh.. Nearly forgot.. Umm.. What do you read to get a clue as to what is going on and what we should do?

Don't get me wrong. I love this whole project and the work that you have put into it Rainer. Just that I'm just a simple girl that knows nothing other than valves and transistors, with a smattering of logic bits, hence why the hassle of it all without understanding what to do or what is going on doesn't sit well at this moment. I'm sure that I must be the only one suffering this and others understand it fully, as it all is second nature.. :)

I
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: openXsensor test version

Post by ReSt »

Downloading via SVN as I showed above downloads the correct files.
The problem was my obviously outdated Arduino version (1.0).
I installed the Arduino 1.5 version and the 'INPUT_PULLUP' error is solved.

But nevertheless, openxvariojeti does not compile, as it obviously requires the JETIBOX.INO library.

But where is that library to be found ?


btw, I do not really need it, because I don't own Jeti gear. I simply stumbled over that error when I downloaded the full set of the different openx-sensor/vario versions

Reinhard
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXsensor test version

Post by rainer »

@ReST: I never compiled the jeti version myself. this was work done by henning. i asked him if he would like to work on an openXsensor compatible output class, but obviously he didn't get to it yet.
So currently the openxjeti directory is not related to openxsensor. Its based on an older version of the openXvario, and can be ignored for the openXsensor.

@Flaps: there is no zip file yet. i will create on once this code is not a test version but a release version.
just download all files from the openxsensor directory into an empty directory on your system. the config file in there is what used to be your config section. the .ino file is the one you use to open /compile/upload to the arduino. the other files just have to be in the same directory but you do not have to worry about them.

@all. the way to hook up the 2 resistors for the voltage divider is described in the config file. as Joao noted, read through the whole config file its the only documentation available right now. If somebody wants to help out with creating Wiki content for this version.... contact me.

Rainer
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

Thanks Rainer. I will sit this one out until the dust has settled and it has been tested on the tame Guinea pigs. :)

One concern I do have at this point, is the fact that I have Arduino 1.0.1 on the Ubuntu platform here and not the 1.5 Version as I cannot find a Debian package for 1.5. So will this 'pic 'n' mix' idea work with version 1.0.1?
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: openXsensor test version

Post by MikeB »

I just downloaded the Arduino IDE for windows and it is version 1.0.5. What should we be looking fo 1.5 or 1.0.5?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXsensor test version

Post by jhsa »

http://arduino.cc/en/main/software

1.0.5 I would say..

The 1.5 Beta adds support for the new DUE boards..

Flaps30, in the link above you find also the latest version for Linux..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

*Warning - Rantette following*
jhsa wrote:Flaps30, in the link above you find also the latest version for Linux..
Nope. The latest for Ubuntu/Debian is 1.0.1

I did manage to make a DEB file out of version 1.0.5 from that antiquated load of rubbish that some people insist on using as a file package that has the TGZ extension. Why on Earth do some people insist on something so crude and useless to most of us.. End result. It crashed the software centre, so that is a no go.

Talking of crude. As for the Arduino software that some of us are forced to use. I have ranted about it before and it still continues to be as user friendly with regards to how things are presented, and the lack of ease it takes to find a specific line of code. It is something that should have progressed past the days of DOS and some quirky DOS based attempt at a GUI. I loath it as much as I loath stuff like Windows ME on a network or Windows VIsta. But I shouldn't be surprised, as anyone using the Tarballs has to be living in some cocoon back in the 70's or thinking that we all love to mess about with junk. Hmm.. 70's Space invaders at the University bar... Nice. :)

Rant over..

So.. I know that there is something better than that Arduino thing as I have seen it and it did look great, apart from the fact that it was a Windows program that wouldn't run under Wine.

The questions at this point are..

(1) Is there something better than the Arduino software we use to burn the chip?

(2) Do we have to have version 1.01 or higher to do the cherry picking?

(3) if the answer to 2 is yes. Then why not just bundle all the code together, and allow us to blank out/remove the bits using that crude Arduino system.

Sorry if I have missed the point with the rant. It's just that over the years I have become frustrated with half baked half software/firmware that has messed up a lot of fine projects. Not bashing your code Rainer. It's the other stuff used to implement it that I find hard to get on with as it's so bad/outdated/antique.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: openXsensor test version

Post by jhsa »

I think that arduino code is a "easier?" version of the C code.. And it can only be compiled by the arduino IDE?
For other stuff I would use the AVR Studio software, but I guess it won't compile arduino?
Anyway, I find the arduino IDE easy enough to work.. Note that for example on other applications you select the chip you want to program. with arduino you select the arduino board you want to program. It's not quite the same..


Something nice I found a while ago is that we can flash the arduino code on a chip using the ISP connections, actually the bootloader must be flashed this way. But normally after that you flash it with a FTDI.
If you want to flash it with ISP copnnections just press the SHIFT key on your keyboard at the same time you click to upload the sketch ;)
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

jhsa wrote:I think that arduino code is a "easier?" version of the C code.. And it can only be compiled by the arduino IDE?
I would have thought that Netbeans would be a better bet as a lot of people complain about the standard software adding bugs along with not very efficient coding. Not that I would know anything about it. I gather that plug ins are available for Netbeans to help with doing the Arduino stuff. Don't know about the burning using FTDI
jhsa wrote:Anyway, I find the arduino IDE easy enough to work..
Hmm.. OKay.. I want line numbers. Colour on disabled lines, colour all over the place to highlight different functions or when to take a beer break. It would help to have a better font style to help reading the stuff thin scrawly stuff really doesn't help reduce eye strain. What we have at present is as I have pointed out, is a nightmare throwback to the seventies worthy of the trash bin.

More afterthoughts. Hopefully this pick n mix style doesn't rely on using beta (read flaky) software, as I see that as a backward step at this stage for those of us that just want to get it all working with the pressure sensor vario, voltage sensor and current sensor. Just my opinion of course.
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: openXsensor test version

Post by rainer »

well you should be thankfull... actually the code modules with their header files are all libraries that normally would have been placed in separate sub folders underneath the arduino library. :D :D by placing them all in one folder i've been able to avoid the users having to spread the files all over the filesystem if they want to be able to use the code.
i could have placed them all into one files. one huge files. Loosing the possibility to have different "flavours" of the oXs by using the modular system.
well actually i might have even been able to handle that, but to be honest. its much easier for me to work with separate files during development.... and as i am doing the big piece of work here.... :D :D i think its fair if you live with having to place some more files into a directory ;-) ...
in an ideal world we would have a clean installer and a configuration program to go with it. if somebody has the time to do it i would be quite happy as well.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: openXsensor test version

Post by Flaps 30 »

rainer wrote:in an ideal world we would have a clean installer and a configuration program to go with it. if somebody has the time to do it i would be quite happy as well.
Now that would certainly make the whole pick and mix procedure a lot better, and more in line to some extent, with what we do when using Companion.

More user friendly coders needed. No beer offered, just us thanking you for your efforts and the odd rant from yours truly. :)
tedbmoss
Posts: 121
Joined: Sun Jul 15, 2012 10:42 pm
Country: -
Location: Peoria, AZ

Re: openXsensor test version

Post by tedbmoss »

Now you guys and gal(s) kvetched all over me and it will take me a week to sort it all out. Thanks for all the info.

Now I got the tortoise and downloaded from the SVN and it all works; but things changed and the instructions don't match. I even downloaded the opentx code. --and am now a tame Guinea pig.
Last edited by tedbmoss on Wed Aug 07, 2013 4:03 am, edited 1 time in total.
User avatar
ethebee
Posts: 18
Joined: Sun Oct 21, 2012 3:37 pm
Country: -

Re: openXsensor test version

Post by ethebee »

Hi Guys,
Spent some time updating the transmitter for telemetry, speaker and haptic, now having a go at building and programming the openXsensor.

Thoroughly enjoying myself with this micro programming lark! :)

Everything went together reasonably well apart from an open-circuit battery sense resistor (didn't have another 56K so used a 68K instead - code changed to reflect this alternative value!)

I have used Pot 2 for sensitivity control.

Not sure if the Vario part is working correctly - both the 'Alt' and 'VSpd' screens display random values at times with any setting of the sensitivity! Sensitivity displayed (using T2) only varies between 86 and 445. When the pot is changed quickly sometimes I can see a negative value but if left alone it settles down to a positive one within the range above.

One thing I would like to clear up initially is the current and battery consumption displays. Because of the way I have wired the current sensor I get negative values for both current (using T1) and battery consumption (using Fuel)! I can't find any code definitions that can generate the ABS value as in the basic openVario code?

I initially set the Tx to display the voltage divider i/p (using Dist) but only received a value of 0.0. Changing this field to VFas managed to show the correct battery voltage of 11.7 volts. Is this correct? :roll:

Can't flight test at the moment as plane is still in its box and I am recovering from a broken ankle! :cry:

Cheers

Eric

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”