Category Archives: Projects

Phil 3.7.11

7:00 –  5:00 VISIBILITY

  • Somehow I lost last Friday’s entry.
    • Walked through the PPM app with Trich, Christie and Leah. There were some problems with how the spreadsheet was getting assembled, but they liked the message organizer.
    • Went over the changes with Dong. He finished up on Friday, and we’re testing today
    • Having very slow response from R when the remote object is running in the server. Odd, because response was immediate when the app was running in java directly. Have to poke at that.
  • Testing Dong’s update
  • Install this morning?
  • I may or may not be leaving this morning. I’m getting a range installed, but the delivery of the range may have been canceled.
  • Added RFlexServer and RFlexClient to SVN
  • Deployed the new PPM but items that had dollar figures did not post while items that did not have dollar figured *did* post. Talked to Dong about this,  and added the bug to the PPM list.
  • Got RFlexServer and RFlexClient running on my home box. Started working on why responses are so slow. THey are not, if R is not being called. Going to try making the reference static.
  • Got a new version of PPM from Dong and deployed it. It seems to be working, in that spreadsheets seem to have the appropriate numbers in them :-). I’m going to talk to Christine and Trish tomorrow.
  • Set up a meeting with Kris U. tomorrow at 3:00

Dong Shin 03.04.2011

  • PPM
    • reworked Export to retrieve all the data for the selected year (year + year_count) = selected year
      • order by Appropriations, year, budget_center….
    • fixed a bug showing FMP (Financial Mitigation Plan) on empty data
    • export data sets are identified by Funding Transaction Name?
    • using uid to divide the data sets
    • adde funding amount to export

Phil 3.3.11

7:30 – 5:30 VISIBILITY

  • Had a thought about getting data out of R. In the same way that I’m writing pix out to files that will then  be read.
    • Tried it, but no luck. It appears that the output from RServe is not considered redirectable
  • Went looking for more hints and found this in the RServe FAQ:
    • String s=c.eval(“paste(capture.output(print(summary(mymodel))),collapse=’\n’)”).asString();
    • And that seems to work nicely. The moral of the story seems to be “Find a way to get R to do the work”
  • Starting on the RemoteObject – should be mostly finished
  • Started RFlexClient
  • Accessing the setupModel.xml file
  • Having some problems getting the message broker. Found a redundant entry in the remoting-config.xml file. That, plus a recompile, redeploy seems to have fixed it.
  • Connected to the RemoteObject! Time to make some fancy widgets 🙂

7:30 – 3:30 VISIBILITY (3.4.11)

  • Hoping to deploy new PPM today, and that there will be no mysterious 502 error message…
  • Starting on some test statistical widgets to try out the remote object methods
  • Deploy went well. Nearly there
  • The queries are SLOW. Wondering if it has something to do with getting the RConnection. Going to try bouncing back the request on Monday (Depending on the stove delivery…)

Dong Shin 03.03.2011

  • PPM
    • reworking queries that retrieve the request data – done.
    • rearranged Show All and FY Filters, Show Selected
    • show Color coded status on Status column only in Requests Panel and Title column in Request Form
    • verified Financial Data in the Excel spreadsheet, fill 0’s with empty data
    • request status is the worst from projects’ status
    • removed user specific requests
    • delete requests added

Dong Shin 03.02.2011

  • haven’t checked for FGMDEV backup for a while – still working.
  • PPM
    • finally got Excel export working
    • as3xls does not work with multiple sheets….
    • added multiple files support along with single file
      • users can export the projects to a single file or multiple files
    • added progress bar
    • ExcelFile.saveToByteArray slows the application down, not allowing UI updates when it writes data
    • disabled project select on INCOMPLETE projects – cannot be exported
    • added error capture on export

Phil 3.2.11

7:30 – 4:30 VISIBILITY

  • Went over the latest version of PPM with Dong. We have a bit of a problem saving out multiple files without having a dialog pop up for each file. It’s possible that an Applet might be a workaround
  • Working on figuring out how to properly traverse a REXP object
    • Attr
      • Parse the debug string?
        • Split on commas
        • Stuff to the left of ‘=’ is an attribute
        • use getAttribute()
        • Recurse to parser?
    • Payload
      • Object o = rl.elementAt(i);
  • Attempted to install PPM on site, and had the following bugs:
    • When running on Trish’s machine, I got a remote object error 502 when trying to save a report for the first time. This did not happen on my box, but it has a static IP address and a hole in the firewall just for it. Will try on another machine today
    • When bringing up a report request, the fields were blank until some event (i.e. show all) was clicked
    • XLS files did not contain dollar figures

Tom.DeVito 3.1.2011

Finally have the Arduino, capacitors, and the SOMO 14-D.  Still need to figure out what micro-SD memory card to get for the SOMO as not all are compatible.

Computer Controlled Amplifier

  • To reduce number of problems, the oscillator circuit will be used to produce the sound.  Later this will be replaced with the SOMO 14-D.
  • Fried first amplifier because I had the pin numbering wrong.  Pin numbering on ICs is numbered down on the left side then up on the right side.  For some reason I thought it was down on both sides and got the VCC and GND pins reversed causing smoke.
  • The capacitor used to filter the audio signal is not supposed to be polar but a polar capacitor will work as long as, the positive side is on the pin and the negative side goes to the audio source.  This seems strange considering the direction of the current but when I had it the other way no sound came out.  Luckily the audio signal isn’t strong enough to blow the capacitor.
  • Switched piezoelectric speaker with regular speaker to make sure it wasn’t causing problems due t it having a higher resistance
  • Realized that when the amplifier was changing volume the sound light sound would cut off.  I figured this was due to lack of power.  Took the whole circuit off the i2c-usb controller’s power and onto the power supply.
  • Was not able to change the resistance on the the rheostat chip.  Realized that all i2c controlled chips must be grounded to the i2c controller gnd.
  • Test class worked for controlling volume!
  • The amp has to be muted digitally in order to get absolute silence.  The piezoelectric speaker, due to having a higher internal resistance, can be adjusted down to being “muted” without having to control the mode of the amplifier.
  • The piezoelectric speaker seems to work well.  Not sure how good it will be for playing sounds, instead of tones.  Need to find out if I can get samples of those tiny speakers I mentioned in a previous post.

Arduino

  • Considering part of the goal is to reduce the number of usb devices(not a very important goal but still), the mega would have probably been better then the Uno.  That said, the uno should be useful to see if it will work for our application, and should have enough outputs for a two finger prototype.  Another advantage of the mega is it can speak i2c which would eliminate the need for the usb-i2c adapter.  However, if I find its better to control the mute function on the amplifier with the second rheostat on the variable resistor chip, we will need two i2c channels in order to communicate with 5 amplifiers.
  • Before I attempt to get the Arduino to communicate with the SOMO 14-D, I am going to try some basic tutorials to make sure I understand how to program it.

Speakers

  • Spoke to a representative at Murata to see if we could get samples of the VSLBP2115E1200-T0.  He directed me to a local distributor Glen White Associates(434-385-6110).  He also said that the Speakers should be used with a audio amplifier for ceramic speakers.  There is no problem with using a regular amplifier but it may not be loud enough due to the higher impedance.

Dong Shin 03.01.2011

  • PPM
    • reworked Data Request update queries to allow new entries. This will remove non-selected and existing data, update current, add newly selected.
    • working on exporting Financial Data Request to Excel.
      • added project headers
      • added user/contact information
      • added for each project
        • Budgets
          • financial data for selected year from Oct to Sep

Phil 3.1.11

9:30 – 7:00 VISIBILITY

  • Dentist this morning
  • Testing Dong’s code. It looks good as far as it goes. We need some kind of excel export for the financial info.
  • Added a page for PPM req’s (for 2011) : http://www.fgmdev.com/blogs/?page_id=4987
  • Somewhat useful tutorial for RServe: http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Drafts/Urbanek.pdf
  • Here’s another: http://www.stat.auckland.ac.nz/~iase/publications/17/C340.pdf
  • Building a more robust data.frame reader. Done
    • It turns out lists can be recursive. I temporarily have the DataFrameReader calling itself, which kind of works but could be better. Fix tomorrow.
  • Working my way through getting some basic calculations. There are some issues where if a string is assigned it is not considered a factor (whatever that is…). Unlike in the R interpreter, a factor must be explicitly set (i.e. “menuType <- as.factor(menuType)”)
  • Went to the customer site and sat around for two hours.

Dong Shin 02.28.2011

  • PPM
    • reworking Financial Data Request
      • Request spans from earliest FY and latest FY in selected projects
      • Request template creates monthly request status
      • Data Request Panel start in current year and month, removed All and reworked filtering
      • Individual Project Status added
      • added data_request_templates table and reworked _data_requests_projects and data_requests tables

Phil 2.28.11

7:30 – 4:30 VISIBILITY

  • It’s starting to feel more Spring-like than wintry. Got 107 miles in on the bike this weekend. My legs are very, very tired.
  • Going to try to do some compound actions with RServe, including running a query and generating a plot into a particular directory. If that works, I’m going to put that code in a remote object and try to trigger it from Flex.
    • Making progress, but getting data out of Rserve data frames is very goofy
  • Cloud-based IDE? – http://www.cloud9ide.com/. Some more stuff here: http://query7.com/cloud9-ide-review
  • Worked with Dong on getting the PPM requests organized in a by-month fashion.

Dong Shin 02.25.2011

  • PPM
    • created DBUpdateSQLs02252011.sql for adding data request tables
    • working on Project export
      • Get all budget centers and amounts query
        SELECT
        c.center_name as `Budget Center`,
        c.center_number as Number,
        GROUP_CONCAT(if(a.year=1,a.amount,NULL)) as FY1Amount,
        GROUP_CONCAT(if(a.year=2,a.amount,NULL)) as FY2Amount,
        GROUP_CONCAT(if(a.year=3,a.amount,NULL)) as FY3Amount,
        c.appropriation as Remarks
        FROM projects p, budget_centers c, budget_amounts a
        WHERE p.uid = c.project_id
        AND c.uid = a.budget_center_id
        AND p.uid = 96
        GROUP BY a.budget_center_id

        SELECT c.center_name as `Budget Center`,c.center_number as Number,
        GROUP_CONCAT(if(a.year=1,a.amount,NULL)) as FY1Amount,GROUP_CONCAT(if(a.year=2,a.amount,NULL)) as FY2Amount,GROUP_CONCAT(if(a.year=3,a.amount,NULL)) as FY3Amount,
        c.appropriation as Remarks
        FROM projects p, budget_centers c, budget_amounts aWHERE p.uid = c.project_idAND c.uid = a.budget_center_idAND p.uid = 96GROUP BY a.budget_center_id

    • Array Collection not returning data in ordered manner? May have to write own parser…

Phil 2.25.11

7:30 – 4:30 VISIBILITY

  • Looking for the mythical java client for Rserve. It does not appear to be in the distro or the svn trunk repo
  • Found it. It was in the snapshots here: http://www.rforge.net/Rserve/files/.
  • compiled the Rserve jar (using make!). Put it up on the maven repo as net.rforge.rserve ver 0.6.3
  • Added R.dll to my path
  • Started the server and connected to it with Putty. The connection was successful, and then the server crashed. That may be because PuTTY sent some bad characters.
  • Talking to the server in java without killing it. Wheee!
  • Writing up a description of our data migration plan – done.
  • Actually able to run an ANOVA and understand what I was doing. I think I can even generate plots and have them put in a particular server folder so that they can be downloaded and displayed in flex.

Tom.DeVito 2-24-2011

Arduino research:

  • Found many links regarding the Arduino electronics platform:
  1. Explanation of different version:    http://www.ladyada.net/library/arduino/unofaq.html
  2. Tutorials: http://arduino.cc/en/Tutorial/HomePage
  3. 414 Arduino projects and counting: http://hackaday.com/category/arduino-hacks/
  4. Search engine for chips: http://www.findchips.com/
  5. Ada’s Store: http://www.adafruit.com/
  6. Sparkfun Store:  http://www.sparkfun.com/
  • I determined that the version we want is the Arduino Uno.  I believe that all latest versions have similar specs, but this one is probably the best for our stage of prototyping.  A smaller one, which mounts onto a board may be better once the electronics are finalized.
  • Due to the recession, DIP chips are getting hard to find because many producers are cutting costs by only make SMTs, which have higher demand.  This is making it so the arduino’s main chip is becoming increasingly rare.  There is a SMT version now to help keep up with demand.  I figured we should stick with the DIP chip while we still can.
  • The Arduino cannot directly control our amplifiers.  This can possibly be done using a gate to route the current through a volatage spliter maintaining a Float, open or close the gate with a second pin to bypass the voltage splitter to make a High and turn off the main pin to make a Low.  This may be easier to program then the current method because you just have to control 2 pins.  That said the Arduino can communicate with i2c devices like the rheostats
  • The Arduino is very easy to program.  Basically you just initialize and loop.  Communication to the device works very similarly to communication with the usb-i2c master chip.  Just set the arduino loop to listen to the com port and do various things depending on what it is sent.  On the PC side its identical to the i2c program, since the Arduino has more memory, I believe the commands can be in the form of char arrays as opposed to hex only.
  • When we were looking at ladyada.net you asked where do people get the time to do all this stuff?  The answer is MIT.  All the students are required to have a website.

Other Electronics

  • I’m going to call the murata company and see if we can get some samples of http://www.murata.com/products/catalog/pdf/p82e.pdf.   They are finger tip sized full-ranged peizoelectric speakers.  Currently I can only find them in quantities of 2000….  They really look perfect for our application but don’t think we will need 2000 til we start production.  (not to mention its still $5 each at this quantity)
  • There are some other options for speakers but I haven’ sen any that look as good as those.  Most speakers this size have a far more limited range of sound.

Amplifier Circuit:

  • Waiting on a few capacitors that were not at the electronics store.
  • Found a small portable break-out board to play audio with. http://www.sparkfun.com/products/9534.  Its has somewhat of an amplifier but only 7 volume settings so our amp chips will still be needed.
  • Needed a bigger breadboard to prototype this circuit.  Not nearly enough room on the one I have
  • Audio will be driven by the aurdino.

Dong Shin 02.24.2011

  • PPM
    • added reset filters on Requests Data
    • joining projects, budget_centers, appropriations doesn’t return projects with 0 budget because those might not have budget centers data – fixed by adding OR p.total_budget = 0 in the query
    • removed colors for projects and added status – incomplete gets red
    • rearranged project filter buttons
    • reworked Active Year filters
    • added tooltips to projects datagrid