Brooke's World The life and ramblings of Brooke.

September 5, 2013

Contextual Electronics : Session 1 : Module 2 : Unit 4: Project Creation : Task

Filed under: Uncategorized — Tags: — Brooke @ 4:32 am

If you want to participate alongside, do the following (before watching the execution video):

Contextual Electronics : Session 1 : Module 1 : Unit 14: The Importance and Role of Failure : Task

Filed under: Uncategorized — Tags: — Brooke @ 4:14 am

List your biggest failure in a project ever on the forum thread for this course unit.

  • A software project that a significant amount of time was spent on.  We delivered the project and the customer didn’t feel they received what they expected.  The biggest issues weren’t technical at all.  The issues were that our communication wasn’t  as good as we thought.  This was an important lesson that I was lucky to learn early on.

 

In the event you’ve never had a big failure, explain why you think that is.

  • I know I shouldn’t answer this one too.  I fail all of the time.   While trying to think of really big failures I struggled.  I just try to manage failure in small bites where possible.  This means that recovery from failure doesn’t have to be as big of an obstacle as it can be when we fail really big!  Unfortunately I don’t get to tell the fun and spectacular failure stories.

Contextual Electronics Session 1

Filed under: Uncategorized — Tags: — Brooke @ 3:04 am

I am participating in an online course called Contextual Electronics – Session 1.  I will be posting my answers to quizzes and homework here.

October 22, 2012

Using Raspberry Pi with PIR ( motion ) Sensor

Filed under: Uncategorized — Brooke @ 6:16 am

I have been using the Arduino for a few years now and recently curiosity got the better of me with the excitement around the Raspberry Pi. I purchased my first Raspberry Pi and since my interest is more in line with interacting with the physical than just having a small computer, I needed a second project. Of course, the first project was to blink an LED!

For my second project, I decided to expand on the first. I still use output to blink an LED, but now I also use input to decide when to blink the LED. The way this project works is by sensing motion using a PIR, Passive Infra-Red, sensor.

Using the Adafruit Raspberry Pi Cobbler, here’s how I connected the Raspberry Pi GPIO pins to the breadboard and wired up the PIR sensor and LED

Download the Fritzing diagram. This requires the AdafruitFritzing library.

Here’s the code!

import RPi.GPIO as GPIO
import time

PIR = 23
LED = 24

pirState = False                        # we start, assuming no motion detected
pirVal = False                          # we start, assuming no motion detected

GPIO.setmode(GPIO.BCM)
GPIO.setup(PIR, GPIO.IN)
GPIO.setup(LED, GPIO.OUT)

while True:
    pirVal = GPIO.input(PIR)            # read input value
    if (pirVal == True):                # check if the input is HIGH
        GPIO.output(LED, True)          # turn LED ON
        if (pirState == False):
            # we have _just_ turned on
            pirState = True
    else:
        GPIO.output(LED, False)         # turn LED OFF
        if (pirState == True):
            # we have _just_ turned off
            time.sleep(2)
            pirState = False;

Parts List / BOM (Bill of Materials) – Excluding Raspberry PI

Part Source Image Approx Price
1/2 Size breadboard Adafruit $5.00
Pi Cobbler Breakout Kit for Raspberry Pi Adafruit $7.95
PIR (motion) sensor Adafruit $10.00
220 ohm resistor RadioShack $1.19
Green LED RadioShack $1.69
Breadboarding Wire Adafruit $6.00
Total $31.83*

* = Prices are the best information from the time this tutorial was written. Prices do not include
shipping.

May 9, 2007

Maven, scm, AcegiSecurity, CAS, ActiveDirectory woes – Building Acegi from source

Filed under: acegi,java,maven — Brooke @ 2:45 pm

Well, I guess I should have known better!!  In order to build Acegi from source, including the sample applications, I needed to use Maven 1.0.2 instead of Maven 2.0.  Fortunately, Maven 1 uses the command maven to invoke it and Maven 2 uses mvn so you can run both on the same machine.  Once I switched to Maven 1, the “how to build from source” page on the Acegi website worked flawlessly!

Here is the page I found that pointed me in the direction that I needed to use Maven 1 instead of Maven 2:  forum entry

Now to test the .war files I was trying to create from the start!

May 8, 2007

Maven, scm, AcegiSecurity, CAS, ActiveDirectory woes

Filed under: acegi,java,maven,scm — Brooke @ 9:08 pm

Expect more on this topic, but I just had to post my latest fun… I am trying to build AcegiSecurity from source using svn and maven. So, I followed the site’s documentation on trying to build from source. Keep in mind, I have had plenty of experience with cvs and ant, but none with maven or svn.

Just trying to start, I ran the ‘maven scm:checkout-project…’ command. What I learned after a couple of hours was that there is a plugin called maven-scm-plugin that does the magic here. At somepoint the maven-scm-plugin was updated to a new version in the ‘plugin repository’ that removed the ‘goal’ called checkout-project in favor of just checkout!

Here is the error I was running into:

[INFO] Scanning for projects…
[INFO] Reactor build order:
[INFO] Acegi Security System for Spring – Parent
[INFO] Acegi Security System for Spring
[INFO] Acegi Security System for Spring – Java 5 (Tiger)
[INFO] Acegi Security System for Spring – Adapters
[INFO] Acegi Security System for Spring – CAS adapter
[INFO] Acegi Security System for Spring – Catalina adapter
[INFO] Acegi Security System for Spring – JBoss adapter
[INFO] Acegi Security System for Spring – Jetty adapter
[INFO] Acegi Security System for Spring – Resin adapter
[INFO] Searching repository for plugin with prefix: ‘scm’.
[INFO] ————————————————————————
[ERROR] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Required goal not found: scm:checkout-project
[INFO] ————————————————————————
[INFO] For more information, run Maven with the -e switch
[INFO] ————————————————————————

The bad news is how long it took to figure this out. The good news is that it forced me to learn more about maven, plugins, and svn.

January 26, 2007

WebSphere 6.1 node agent won’t start

Filed under: WebSphere,WebSphere 6,Windows — Brooke @ 12:32 am

I have just recent run into and solved a problem where a WebSphere 6.1.0.3 nodeagent process wouldn’t start on Windows. What was odd is that it initially presented itself by not starting via the Windows Service. I was able to start it via startNode.bat just fine. When it didn’t start, the java.exe process would run, get to about 50-60mb, take 100% of cpu and then not get any further.

Next, I tried starting it via startNode.bat while running as the same user that the service was running as, and discovered that it didn’t work running as that user. Now that was interesting. Somehow there was a problem related to a specific user. The fun part was what came next. A look through all of the WebSphere logs didn’t yield anything. I turned tracing on to the highest level and that didn’t reveal anything.On the thought that maybe some file couldn’t be read or written to, I grabbed the filemon utility from Sysinternals.com and noticed a file that was being overwritten under c:\Documents and Settings\Local Settings\Application Data\javasharedresources . That was interesting, but didn’t seem that important.

Next, I used the Windows “runas” command. I logged in as the user that was unable to get startNode.bat to work. With runas, I specified to run as myself using my profile and the nodeagent started just fine. Next, I specified to run as myself, but to use the profile for the user that was broken by specifying /env. And would you believe it, now it wouldn’t start. Hmmm, so the problem was somewhere in the profile and filemon had pointed me to a file that was under the broken user’s profile!

I renamed the file under c:\Documents and Settings\Local Settings\Application Data\javasharedresources and then ran startNode.bat as the user it had not been working for. Whew, it worked! I have no idea what this file is used for, but when it was recreated, all was well. Running a difference on the files yielded nothing and the privileges appeared to be the same between the two files.

January 21, 2007

Podio Books

Filed under: Fun — Brooke @ 9:36 pm

Yes, I know, long time no post!!  I thought I’d pass along something I learned about a few months back that can quickly get out of control in time consumption if you let it!!  So, I had found podcasts, which are my way of using the dead time in the car, at the gym, and projects around the house.  While listening to a Linux podcast, I heard several teasers about something called a podio book.  Specifically, Chess Griffin of Linux Reality, mentioned the works of JC Hutchins – 7th Son and the works of Scott Sigler including EARTHCORE.

If you like Science Fiction these are great books that can be listened to on your favorite MP3 player.

Give them a listen, I think you will enjoy them.

-Brooke

September 10, 2006

G41 laptop – nvida woes – dual monitors working!

Filed under: Linux,Ubuntu — Brooke @ 5:54 pm

In the process of getting dual-head, “TwinView” monitor support set up, I discovered an interesting challenge.

First, dual-head support allows you to have your computer display to output to two displays at the same time. In my case, the output is going to both the laptop display and an external monitor.

The challenge was that I had installed the nvidia-glx packages for the OpenSource nvidia driver support. Some time passed, so I forgot I had done that. Then, when I decided I wanted to have dual monitor support, I found a site that talked about modifying the /etx/X11/xorg.conf file after installing the closed-source, commercial, drivers directly from nvidia. So, I just installed the commercial drivers, with the help of a very bright friend, Theron. Theron was able to make the necessary modifications to the xorg.conf file and had my desktop spanning two monitors! This was exactly what I was looking for.

So, as any previously burned hacker of Linux config files has learned, it is a good idea to reboot after making changes that affect use of your hardware. This lets you fix any problems while you are still in the frame of mind of what you were messing with. Well, we quickly learned that there was an issue. We had to keep reinstalling the nvidia drivers after booting because the Xserver would no longer run. Then, we would run startx and everything would be fine until we rebooted. We later discovered that the problem was the nvidia-glx package that I had installed previously. After these packages were removed and the machine rebooted, everything was working great.

I am including the contents of my xorg.conf file I am using for those of you with nvidia cards (go5200) or a IBM G41 laptop as this should help you get running without having to mess as much. Make sure you make a backup copy of your xorg.conf before you make any changes.

X= Snip =X

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Tue Aug 1 21:11:12 PDT 2006

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0” 0 0
Screen 1 “Screen1” 0 0
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
EndSection

Section “Files”
RgbPath “/usr/X11R6/lib/X11/rgb”
EndSection

Section “Module”
Load “dbe”
Load “extmod”
Load “type1”
Load “freetype”
Load “glx”
EndSection

Section “InputDevice”

# generated from default
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “auto”
Option “Device” “/dev/psaux”
Option “Emulate3Buttons” “no”
Option “ZAxisMapping” “4 5”
EndSection

Section “InputDevice”

# generated from default
Identifier “Keyboard0”
Driver “kbd”
EndSection

Section “Monitor”
Identifier “Monitor0”
VendorName “Unknown”
ModelName “Unknown”
HorizSync 30.0 – 110.0
VertRefresh 50.0 – 150.0
Option “DPMS”
EndSection

Section “Monitor”
Identifier “Monitor1”
VendorName “Unknown”
ModelName “Unknown”
HorizSync 30.0 – 110.0
VertRefresh 50.0 – 150.0
Option “DPMS”
EndSection

Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
EndSection

Section “Device”
Identifier “Device1”
Driver “nvidia”
VendorName “NVIDIA Corporation”
EndSection

Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
Option “TwinView” “True”
Option “TwinViewOrientation” “LeftOf”
Option “UseEdidFreqs” “True”
Option “MetaModes” “1280×1024, 1280×1024”
SubSection “Display”
Depth 24
Modes “1600×1200” “1280×1024” “1024×768” “800×600” “640×480”
EndSubSection
EndSection

Section “Screen”
Identifier “Screen1”
Device “Device1”
Monitor “Monitor1”
DefaultDepth 24
Option “TwinView” “True”
Option “TwinViewOrientation” “RightOf”
Option “UseEdidFreqs” “True”
Option “MetaModes” “1280×1024, 1280×1024”
SubSection “Display”
Depth 24
Modes “1280×1024” “1024×768” “800×600” “640×480”
EndSubSection
EndSection

X= Snip =X

September 2, 2006

Flash Player in Ubuntu – Audio

Filed under: Linux,Ubuntu — Brooke @ 12:18 am

Well, it took awhile to find, but I finally found a solution to get my audio working reliably for Firefox w/ Flash. The crazy part is how simple the fix is!

I found this fix at the MacEwan blog site. Thanks to you Mac Ewan!

sudo aptitude install alsa-oss
sudo gedit /etc/firefox/firefoxrc

FIREFOX_DSP=”aoss”

« Newer PostsOlder Posts »

Powered by WordPress