|
Post by Frisbone on Dec 23, 2013 9:44:51 GMT -5
Cool, I'll have to fix that when I'm back from Virginia.
|
|
|
Post by lintball on Dec 29, 2013 22:56:49 GMT -5
At this point I have the software from GIT and modified the source slightly to handle my DIO. I got the code running and tested the major buttons that I have installed; trigger,reload,frag,jump,duck, melee, weapon switch. I have more physical buttons to add to the gun but I think I am going to focus on the real meat of the project and get the DACs and Accel up and running.
TODO: 1. DAC hardware install into gun chassis 2. DAC coding 3. Accel hardware install into gun 4. add Xbox System buttons start,back, Xbox, to gun 5. add Mode buttons mode,config, LED to gun 6. D-pad install into gun
|
|
|
Post by Frisbone on Jan 1, 2014 12:24:17 GMT -5
I don't remember if I mentioned it but I launch the software from a bash script that sets the IO outside of the software - make sure you run this and adjust the script so it matches your IO.
|
|
|
Post by Frisbone on Jan 3, 2014 14:31:57 GMT -5
Can you send me your tightvnc script? I did what you said but id didn't auto-start for me. Perhaps you changed something else aside from spacing?
|
|
|
Post by lintball on Jan 3, 2014 21:49:18 GMT -5
Sure I will email it out to you tonight...i might of tweaked a line or two in there. Hard to remember at this point, I was trying a lot of different things.
|
|
|
Post by Frisbone on Jan 6, 2014 10:14:00 GMT -5
Strangely I was confused about what vnc server I had been actually running for the past 6 months. It seems that the references to tightvncserver and the init.d startup file were outdated and I was using simply "vncserver" - which is not tightvnc.
What is likely is that I couldn't get tightvnc to work so I left it as is and installed a different one (having the generic name vncserver, and I start it differently).
Is tightvnc working out ok for you? No issues with response time or speed?
|
|
|
Post by lintball on Jan 6, 2014 22:26:26 GMT -5
For the most part it works well. The only thing I notice that if I leave the Pi running for a day or so, I loose the ability to connect to it. I can still ping the Pi but I have no luck connecting via SSH or VNC.
|
|
|
Post by Frisbone on Jan 7, 2014 8:05:37 GMT -5
I've seen that, but not after just a few days - like a week or longer. I've never done a file system check after having it sit for various periods - but it could be that some temp areas are filling up and we run out of virtual memory space. Not too worried about it as ultimately lots of things will be turned of and locked down. Probably lots of people in the RPi world discussing locking it down for long-term use.
|
|
|
Post by lintball on Jan 11, 2014 20:10:40 GMT -5
At this point I have the DACs installed into the gun chassis and connected to the I2C bus. I worked on the DAC code, just tweaking the commands to match the spec. The main thing was to init the DACs and save the 50% output to its EEPROM if it wasn't already set. This way as soon as the DAC gets power it will default to 50%. I tried it out with the game and its working fine, no head movement at all. I have the accel powered and connected to the i2c bus too now, I am going to go through its spec and start look at your code/notes.
Which way is the Accel mounted in your system...I assume Y up?
|
|
|
Post by Frisbone on Jan 12, 2014 8:04:30 GMT -5
I'm assuming you are using the MMA8452Q? I have mine oriented so that Z is aligned with gravity, and Y is aligned with the barrel. I suppose I understand why you might have thought that Y was with gravity. I kept the standard Cartesian model within the software so as not to confuse people that might have 3D software backgrounds (where Y is typically height, and Z is typically the added 3rd dimension of depth). The DAC initialization was exactly as I was thinking as well. I wish it were possible to do this with PWM. FYI - I have some flags in the code that if you set them correctly and launch the software specifying a file name you can send in sample AM data (or short-cut it with velocity and/or position data) so you can test software control of the JY alone) - if you want to do this, details are below: sillyprojects.freeforums.net/index.cgi?action=display&board=itc&thread=60BTW - did you notice this post? It was meant for you: sillyprojects.freeforums.net/index.cgi?board=itc&action=display&thread=59
|
|
|
Post by lintball on Jan 16, 2014 13:08:08 GMT -5
Thanks for the info on the test script...I was hoping there was something like this to double check my output command and axis. Though I was about to try it when I noticed some of my dio-mapping was acting odd...always something. Usually most buttons will trigger(aka generate the interrupt) but there is one that stopping working. Other times the one button that wasn't working before now works and most of the other buttons stop. Still trying to figure out where the problem is. Maybe something is something is shorting the ground.
|
|
|
Post by Frisbone on Jan 16, 2014 13:31:59 GMT -5
Hmm - there is one problem that I think is with the support library - or my use of it, that I didn't track down yet. The dio will act very flaky and "forget" some buttons on successive execution iterations of the code. If I'm interpreting your comment correctly this may be what you are seeing. Before you get too worried, make sure you try running the test from a fresh boot and see if you experience the issue right after seeing it. I overlooked it because of bigger fish...
|
|
|
Post by lintball on Jan 16, 2014 14:11:24 GMT -5
I'll try that then. Yea it is almost like its forgetting or not seeing some button presses. And I have been Ctrl-C the code a bunch and rerunning it. Maybe some sort of shutdown command is not being ran when its closed this way. I even tried skipping the button and taking the pin straight to ground and it was still no registering. Glad its not just me. Where did you get that library from?
|
|
|
Post by Frisbone on Jan 16, 2014 16:13:45 GMT -5
WiringPi is the name and you'll get a hit on a google search - it's a British guy - not a group. He uses the HiPi library which contains the Microcontroller logic. I will find links for them both. I seem to recall that I mucked with one or both slightly.
|
|
|
Post by Frisbone on Jan 16, 2014 20:25:59 GMT -5
|
|