Tuesday 14 May 2013

Battling Anxiety

As I was watching television this evening an advertisement interrupted my show. It was an advert for business insurance, in which you were prodded to ask the question, "What if?" In other words, what if this or that unexpected event happened to the detriment of your business?

For some reason that is a question that we are very good at asking, but not always good at answering. Unfortunately in our personal lives many of our "What if"s cannot be solved by dialling the insurance hotline. While our housing insurance, legal insurance, life insurance, medical aid schemes and security companies provide some peace of mind we may still be left with more than enough fears to keep us awake at night.

The problem with anxiety is that the thing that you are worrying about is most often something that you have very little control over. And in my experience, the harder I try to convince myself not to worry, the more anxious I become. The more I focus on the issue the more I realise that I cannot control the future and therefore have no guarantee that it will not happen, and it becomes a vicious cycle where a single "What if" can snowball into a fear that overrules all other thoughts of peace and joy. It is like a seat belt that got stuck - the harder you pull, the less you accomplish.

So the question is, how do we battle anxiety effectively? How do you work hard at fighting fear without achieving the opposite result? Something that has been a great help to me is a part of Paul's letter to the Philippians, which almost provides a recipe, a list of things to do when experiencing anxiety:

"Rejoice in the Lord always. Again I will say, rejoice! Let your gentleness be known to all men. The Lord is at hand. Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made known to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus.
Finally, brethren, whatever things are true, whatever things are noble, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report, if there is any virtue and if there is anything praiseworthy—meditate on these things. The things which you learned and received and heard and saw in me, these do, and the God of peace will be with you." Philippians 4:4-9

 1. Rejoice in the Lord
"Rejoice in the Lord always. Again I will say, rejoice!"

The problem with worry is that it keeps our focus mainly on our situation and on ourselves. One of the main symptoms of worry is a lack of joy. When we try to find joy in our circumstances we will be disappointed. However, while circumstances are constantly changing, the Christian has something more secure to find his joy in: God. I recently stuck a note on my desk which says: "Rejoice in [who] the Lord [is no matter where you are]" which is what I think this verse means. If you choose to look away from your circumstances and find your joy in the Lord you will not be disappointed, because God never changes.

2. Give your requests to God
"Be anxious for nothing, but in everything by prayer and supplication, with thanksgiving, let your requests be made known to God; and the peace of God, which surpasses all understanding, will guard your hearts and minds through Christ Jesus."

The reason why a Christian does not need to be anxious is because everything that is not under his control is fully under God's control. We fret because we want something but we are not sure that it will happen. We will never be sure of the future, but we can be sure that the One who holds the future is committed to looking after His children. All we need to do is to ask what we want and trust that God will provide in such a way that whatever happens will be for our good (Romans 8:28). It is only possible to get to the point of thanksgiving when we truly give the issue over to God. We must be willing to trust the Lord to take care of the issue and not try to figure it out in our minds anymore. Note that it does not say that bad things will never happen, but rather that we will be able to have peace and joy in any circumstances because we trust in God to work it out for good.

After this the wonderful promise comes, that God will give us a peace that is so deep and so effective that it cannot be explained or fully understood, because it is a supernatural peace. Please note that having peace is not given as a command. It is God who gives us peace, we cannot stir it up in our own hearts. This is where the crux of the matter lies, because if we try to force ourselves into having peace it will fail, but when we look away from the issue and focus on the Lord, He will give us the peace that we need. And then we need not worry about falling into anxiety again, for as long as our focus is on Him, He will guard our hearts and minds from fear.

3. Meditate on these things
"Finally, brethren, whatever things are true, whatever things are noble, whatever things are just, whatever things are pure, whatever things are lovely, whatever things are of good report, if there is any virtue and if there is anything praiseworthy—meditate on these things."

As soon as we free our minds from worry they become empty, and need to be filled with something else. I actually had an experience today where I tried to get rid of worry, but during the moment that I forgot about my fears I did not know what else to think about. If you have been spending most of your time thinking about something that is bothering you and you give it over to God, you will suddenly have a lot of free thinking time, and if you do not fill that with something positive the worry will come back.

The advice Paul gives is very practical - fill your mind with thoughts about things that are good and beautiful. This is more effective than the positive thinking that the world offers because Paul talks about a mind that is not only focused on the positive things in life, but on God who is the source of all good things. So when you have looked to God for your joy, and when you have told Him everything that you want, and when you have trusted Him to look after you, then use your free time thinking about things that are beautiful. Thank God for your blessings but also look at things that are outside of yourself, such as nature or the timeless truths of God's Word, and focus on these.

The conclusion is that if we follow the commands given to us in God's Word, then the God of peace will be with us, which reminds me of the following song. The second verse says:


Not a shadow can rise, not a cloud in the skies,
But His smile quickly drives it away;
Not a doubt or a fear, not a sigh or a tear,
Can abide while we trust and obey.

Trust and obey, for there’s no other way
To be happy in Jesus, but to trust and obey.

Sunday 31 March 2013

Time

When I first started this blog I didn't set my goals too high - I would be happy if I could write only one blog post per month. However, being back at varsity the month of February soon passed without any sign of an article, and now it is the last day of March with merely two hours and five minutes before I miss the mark for a second time in a row.

This got me thinking about time. What happened to February? Where had March gone to? As soon as I plunge into the depths of daily life the currents seem to overwhelm me so that I do not have (or do not make) time for reflection so that I have something to tell you about. So as I sit here I am thinking about the concept of time, and my mind wanders back to the beginning of the year when I was reading a book by C. S. Lewis called the The Screwtape Letters. In this fascinating novel a senior demon, Screwtape, writes a series of letters to his nephew Wormwood to give him advice on how to keep his "patient" off the right path. With a sharp sense of humour, Lewis displays an amazing insight into human character and how spiritual matters relate to even the mundane details of everyday life.

One letter touches on the topic of time, in which Screwtape tries to explain to his nephew how to keep his patient's mind fixed on the future, and why this is neccesary. In the following exceprt, bear in mind that the "Enemy" refers to God from Satan's point of view, and what is good to them is evil to us.

"The humans live in time but our Enemy destines them to eternity. He therefore, I believe, wants them to attend chiefly to two things, to eternity itself, and to that point of time which they call the Present. For the Present is the point at which time touches eternity. Of the present moment, and of it only, humans have an experience analogous to the experience which our Enemy has of reality as a whole; in it alone freedom and actuality are offered them. He would therefore have them continually concerned either with eternity (which means being concerned with Him) or with the Present—either meditating on their eternal union with, or separation from, Himself, or else obeying the present voice of conscience, bearing the present cross, receiving the present grace, giving thanks for the present pleasure. Our business is to get them away from the eternal, and from the Present. With this in view, we sometimes tempt a human (say a widow or a scholar) to live in the Past. But this is of limited value, for they have some real knowledge of the past and it has a determinate nature and, to that extent, resembles eternity. It is far better to make them live in the Future. Biological necessity makes all their passions point in that direction already, so that thought about the Future inflames hope and fear. Also, it is unknown to them, so that in making them think about it we make them think of unrealities. In a word, the Future is, of all things, the thing least like eternity. It is the most completely temporal part of time—for the Past is frozen and no longer flows, and the Present is all lit up with eternal rays."
And then this statement in particular:
"[In the Present], and there alone, all duty, all grace, all knowledge, and all pleasure dwell." C. S. Lewis, "The Screwtape Letters", Letter XV 
Most of us spend much of our time either thinking about the past, or wondering about the future. The past, as Lewis points out, is known to us, and reliving the past in our minds can never change it. On the other hand, the future is unknown to us, and as such is much more prone to making us fret, because we do not know for certain how it will turn out. But when our minds are fixed on the past or on the future, we cannot fully enjoy the present moment or fulfil our present duty. What struck me is that I can neither do nor experience anything in the past or in the future, but I can only perform an action or have an experience in the present. And if it is true as I wrote in my first post that life is mainly made up of doing and experiencing things, then the only place I can do anything, experience anything, learn anything, enjoy anything, is in the present.

Oh, what a discontented person I am. I think about this thing or that which I would like to have, but as soon as I get it, my mind is already on the next thing I desire. It seems like I am always waiting for something in the future, but when the time comes for me to enjoy it, I no longer want it because I am waiting for something new. So often when I am at home I want to get out of the house, but when I am at varsity I cannot wait to get home. It's funny how the desire for something in the future, or the longing for something in the past is often so much stronger than any enjoyment I experience in the present. But I forget that I can only enjoy what I have now, that in the present, "all pleasure dwell".

But that is not my only problem. I spend so much time thinking about my studies, about the fact that I have been wasting so much time in the past, and worrying that I will not be able to catch up with my work in the future. But in all this worrying I often fail to do what I can in the present moment. I fool myself by saying that I am planning for the future, but real planning only takes minutes, while fretting can take up hours. I forget that I can only do anything now, that in the present, "all duty dwell".

I also spend  a lot of time thinking about where I am in life; how far I've come in the past, and how far I still need to progress in the future. But in all this analyzing I forget to ask the Lord for the grace to meet the current challenge I am facing. I forget that God can only help me now, that in the present "all grace dwell".

Lewis says that the present, and eternity should be our main concerns. Do not now think that eternity is the same as the future. The future is linked to time, but eternity is completely separate from time, in fact in eternity time doesn't exist. While I go about my daily life, living in the present, I need to think about eternity as well; I need to live with eternity in view. God is eternal, and we need to think about Him, and for a Christian it is vital to spend every present moment with God in view. I think one of our main problems is that we put so much emphasis on the realities of this life that it becomes more important than the realities of eternity. But that is a topic for another time.

I pray that the Lord will teach me to live in the present - free of past guilt, and free of future worry. I know it will not be easy, but I trust that as He teaches me to live with my eyes fixed on Him who is in eternity, I will be able to enjoy the present pleasure, perform my present duty, and face the present challenge.

Saturday 19 January 2013

Making my own Guitar Hero controller




Last year I had the privilege of being introduced to a video game called Guitar Hero. I had heard the name before but, being a musician myself I didn't think that pressing a few plastic buttons could have much to do with real musical talent, or could evoke in me any real excitement. Until I picked up that wonderful little piece of plastic... I was soon hitting those buttons furiously, playing song after song.



This first experience of mine was on a friend's Xbox with the official Guitar Hero controller, similar to the one shown below. On the fret board you have 5 buttons that have to be pressed according to the scrolling notes displayed on-screen. However, notes are only "played" once you hit the strum bar on the body of the guitar. The strum bar can be be alternated up and down which is useful for playing fast sequences of notes. The whammy bar works similar to that on a real guitar, and can be used on long notes to vary the pitch, adding vibrato to the sound. Using the whammy bar at the right time can also increase you Star Power which builds up during each song. As soon as you have accumulated enough Star Power you can activate it by tilting the guitar - this will momentarily make the crowd more lenient and reduce your chances of being booed off stage.



 After playing Guitar Hero on Xbox I downloaded a free PC clone, Frets on Fire. To play, you pick up your keyboard and hold it like a guitar, using F1-F5 as the frets. I enjoyed playing the three songs included but soon started longing after the real thing, so I ordered a copy of the PC version of Guitar Hero: World Tour. I enjoyed playing it on my keyboard and eventually finished career mode on Hard, but still wished I had a proper Guitar Hero controller.

As I had a lot of free time during the holidays I decided to make my own controller. About two weeks ago I went into a plastics store and found a nifty little plastic guitar just waiting for me to buy it. I am sure the guy who designed this thing had in mind that someone might want to transform it into a Guitar Hero controller. Instead of being glued together like most plastic toys this guitar was neatly fixed together with screws. It had a lot of space in the body for wires and circuit boards and various other contraptions. It had three ready-made plastic buttons which could be removed. It had a sound hole through which you could place a strumming bar. It had a removable bridge and a removable piece of plastic around the sound hole underneath which screw heads could be concealed. It had a removable fretboard underneath which circuitry could be placed. And last, but not least, it was just the right size and shape, and even came with its own guitar bag (admittedly made of very thin, very cheap plastic, but nonetheless).

No sooner did I reach home, than I was tearing it apart - the most enjoyable experience of a tinkerer, second only to putting something new together. I took as my example the original Guitar Hero controller and endeavored to make a similar controller.

Interface


I was designing a PC controller and decided to take apart an old PS/2 keyboard and use its circuit board for my own controller. The circuit board of a traditional keyboard is actually quite small, it can fit into the palm of my hand. Inside the keyboard you find three plastic sheets on top of each other. Underneath each key you will find two conductive dots facing each other, but not touching. When you depress the key, the two dots touch, connecting two different nodes on the circuit board. The circuit board detects which two nodes are connected and decides which key was pressed. 

The first thing I had to do was to label the nodes from 1 to 26 and test which nodes correspond to which Guitar Hero button. For example, the five fret buttons are V, C, X, Z, and Shift respectively, Space activates Star Power and Alt is for the whammy bar. Since I was using a multimedia keyboard I was also able to find the combinations for the volume up and volume down keys. In essence all of this meant that for every button in my guitar, two wires would run to the circuit board and a short circuit would be created between a certain two nodes when the switch is activated.

In the original keyboard, the "wires" on the sheets are not actually soldered to the circuit board, the thin coatings only touch the nodes on the board. For this reason graphite was used to coat each node, since graphite makes a good electrical contact. The only problem is, graphite is not a metal and can therefore not be soldered onto. I tried using insulation tape to tape my own wires to the circuit board but this was a failure since the wires would not stay put. I then realised that underneath each graphite node was probably a copper strip, so armed with a Swiss Army knife and great care I managed to scrape off some of the graphite on each node to reveal a nice clean, solderable metal strip.

I decided to use ribbon cable throughout the project since its wires are thin and stranded which means that they have less chance of breaking off where they have been soldered (which did happen once). Also, a group of wires can be run together.

I had the option to use the existing keyboard cable as is, but it would be too short and it would always be hanging from the guitar, even when it is not being used. Luckily I found an old female PS/2 connector in my room. Since the PS/2 connector would be placed on the other half of the guitar as the rest of the circuitry, I decided not to solder the wires onto the circuit board. Instead, I desoldered four metal pins from an old PCI card and soldered these to the circuit board. The female connector had a plug on the other end which could fit on these pins. For the cable, I took the keyboard cable and an old PS/2 mouse cable, checked which wires correspond to which pins and soldered the wires together, making a long male-male PS/2 cable.


Strum bar



This was one of the parts of the project I enjoyed most. I remember lying awake one night before the holiday trying to think of a way to make my own strum bar. I had acquired two neat push-button switches for a varsity project and wanted to use these. But how do you convert two push-buttons into a strum bar which can alternate up and down? Something told me that I would have to use some sort of a hinge. If you could place a hinge on top of the guitar and place one push-button on each side to hold it up you would have a strum bar, but that would be a very ugly sight. So I decided to place a door hinge underneath the sound hole, place a push-button on each side, and then fasten to the hinge a plastic strum bar which sticks out of the sound hole. This way, when you push the strum bar down, the hinge pushes up against the push-button, and when released, the push-button returns the hinge to its original position.

After fastening the hinge to the guitar I made two brackets from aluminium to hold the push-buttons in place. It was quite tricky to get the push-buttons properly aligned. At first I cut out a plastic strum bar from an old transparent CD (the ones you find at the bottom of a pack of recordable CDs), but it was rather flimsy and made two cracks where it was fastened to the hinge. Later I used this as a template and cut out a new one from the back cover of the old keyboard which proved to be much sturdier.


Fret buttons



For the fret buttons, I decided that I would cut out a row of five plastic keys from the old keyboard. Each key is made up of a removable plastic keytop, a plastic base into which the keytop fits, and a rubber cap underneath the base which acts like a spring. However, I decided to use the rectangular buttons such as Alt and Ctrl instead of the square keys, as this looks more like the keys on the official controller.

At first I tried cutting out the corresponding parts of the plastic sheets and very carefully soldering the wires to the conductive traces, but while it worked most of the time there always seemed to be one or two wires with a bad connection.





I saw that this was not a very reliable solution so I started looking elsewhere. The only other switches I could think of was mouse micro switches. So I gutted one or two old mice and desoldered five micro switches. I then placed these on a veroboard and soldered the corresponding wires.



I cut out a column of five key bases and carefully mades holes in the plastic fretboard through which these bases could fit. Two screws would hold everything together. A problem with the mouse switches was that you only have to depress them very slightly, while a normal keyboard key has to be depressed much more which gives a more natural feeling. I could not place the rubber caps underneath the key base as they would fall out. To solve this problem I cut out the middle part of the rubber cap (see picture) and placed it between the keytop and the base, instead of placing it underneath the base. This lifted the key slightly so that you have to press it down before it clicks.

Another problem was that, as you can see from the bottom-left picture, the keytop has a hole underneath so that it cannot press against the mouse switch. I therefore cut screws to the correct length and screwed them underneath the keytops so that the screw head can depress the switch (top-right picture).

After assembling all of this I placed the PC board underneath and fastened everything together. It was necessary to wrap insulation tape around the screws as they would otherwise cause a short-circuit between some of the switches.


Control buttons




The plastic guitar had three removable buttons that represent the volume/tone buttons on a real guitar. I needed one button for the Start button, and I also wanted to use one button each for volume up and volume down. I used the same principle as for the fret buttons and soldered three mouse micro switches onto veroboard. The bottom of the plastic buttons were hollow, so I filled it with epoxy.


Tilt sensor (Star Power)



At each step in my project I tried to keep the functionality of my own controller similar to that of the official controller. This meant that I needed to design a tilt sensor that activates Star Power (i.e. activates the Alt key combination) when the guitar is tilted vertically. In order to do this I took a small switch as shown and cut a piece of metal that could rotate and hit the switch when the guitar is tilted. This mechanism works more effectively when the guitar neck is "thrown" backwards in the air. I glued the switch to the inside of the guitar body at the correct angle. Between the switch and the piece of metal I glued two pieces of fridge magnet to prevent the metal piece from bouncing.



Whammy bar




This was an interesting part of the project. On the official controller you can move the whammy bar in various degrees; the more you press it down, the more the pitch bends. You can also do the same with your mouse by moving it left and right, but when you press Spacebar the whammy is either on or off; nothing in-between. I considered integrating a mouse circuit board into my controller but this proved to be too difficult, so I settled for the on/off system. I needed a long rotating rod that goes into the guitar near the bridge and makes contact when it is pressed down, and it needs to have spring-like motion.

An old project of mine, a soldering station, had an aluminium rod with a crocodile clip at its end for holding objects. I took this rod to use as the whammy bar. It has a nice matte metallic appearance and bends easily, but not so easy that you would bend the whammy bar during use.

It's hard to say how I came up with the first peculiar-looking prototype on the left. I had the idea of using a micro switch that presses against the inside of a cylinder when you bend the rod; allowing the whammy bar to rotate. However, this prototype didn't work very well.





I then started wondering whether I needed a switch at all. The only thing I really needed was two pieces of metal making contact. I kept the idea of using a cylinder, but this time a metal cylinder. If I had an aluminium rod and an metal cylinder, I only needed to make the rod touch the sides of the cylinder. So I went into the garage and cut off a piece of copper pipe, cut four slits on the one end and bent the sides into legs. I then cut four slits on the other end as well and strung elastic band to hold the rod in the middle (see picture). In this way the rod stays in the middle, but touches the sides when the whammy bar is pressed down. I soldered the one wire directly onto the copper. For the other wire, I placed a brass washer on the end of the rod and used a side cutter to pinch the aluminium above and below it, and soldered the wire to the brass washer.



The final product





Friday 18 January 2013

Appelkooskaaskoek

Om 'n bachelor te wees beteken dikwels dat jy dinge begin doen wat jy nooit voorheen aan sou gedink het nie. In die afgelope twee jaar het ek geleer om myself tuis te maak in die kombuis - nie dat 'n wasbak en 'n oondjie wat elke keer uit die kas gehaal moet word werklik die naam verdien nie, maar nou ja, mens sal verbaas wees wat jy met 'n tweeplaatstofie en 'n mikrogolf kan verrig.

Gister blaai ek in my verveeldheid deur 'n ou Huisgenoot en kom op die volgende resep af. Aangesien ek steeds op vakansie is sonder veel om te doen het ek besluit om hierdie kaaskoek te probeer, al was dit ook net om die verveeldheid vir 'n slag op sy plek te sit. Alles het goed verloop, die appelkose gee 'n effense suur smaak wat gepas is vir 'n yskaskaaskoek. Daar was net een probleem met die elektriese klitser - ek was nie bewus dat room die vermoë besit om botter te word nie. Hulle sê altyd mens moet versigtig wees as jy met power tools werk...

Kors
1 pakkie (200g) Nuttikrust-koekies, gekrummel (Ek kon dit nie vind nie toe gebruik ek sommer Tennisbeskuitjies)
60g botter, gesmelt

Vulsel
1 blik (410g) appelkooshelftes
1 pakkie (80g) lemoenjelliepoeier
250g maaskaas
250ml room, styf geklits
Ekstra appelkooshelftes of gekapte neute vir versiering

Kors - Meng die koekiekrummels en gesmelte botter en druk dit op die boom en teen die kante van 'n tertpan van 20-22 cm in deursnee vas.

Vulsel - Dreineer die appelkose en behou die vloeistof. Verhit die vloeistof en roer die jelliepoeier in tot dit opgelos is. Verwyder van die hitte en laat afkoel. Verpulp die appelkose in 'n voedselverwerker en roer dit saam met die maaskaas by die jelliemengsel in. Vou die geklitste room in en giet die mengsel in die kors. Plaas in die yskas tot gestol. Versier met appelkose of gekapte neute soos verkies.
Genoeg vir 6-8 mense.

Tuesday 1 January 2013

A resolution for a new year

It is one-and-a-half hours to midnight on the last day of 2012. For many, New Year's is a time of reflection. Most of us are on holiday and this is a time when we get a break from our normal routine and spend time resting and enjoying being with our families. We think about the year that has passed. For some it might have been a good year, for others a year of disappointment. We ask ourselves whether our expectations had been met, whether we have achieved our goals. It is as if we come up for a breath of fresh air before diving again into the ocean of daily life.

I am glad for a time like this. During the year I often find myself being so busy that I barely have time to stop and think about where I am and where I am going. When I look back at 2012 I regret that I have too often lost sight of the bigger picture, trying so hard just to survive from one day to the next that my life becomes filled with stress and worry about things which are not ultimately that important on the larger scale of life. I think part of the problem is that, as I pointed out last time, we tend to place all the importance on the things we can see, feel, and touch, while the more subtle things such as my relationship with God is often the first to go missing from our priority lists.

I have thought about this past year and what I would like to do differently in 2013, but I also know that New Year's resolutions have a reputation for not lasting very long. What I really need is not a long list of resolutions, but rather a principle that will help me to maintain perspective on a daily basis. I would much rather come up for air every day than taking one deep breath and only coming up again at the next New Year. For this reason I have made the following my New Year's resolution:
My first priority in all of life will be maintaining a personal relationship with Jesus Christ.
How do you maintain a relationship? By spending time together. God speaks to me as I read the Bible and as I experience life, and I speak to Him through prayer. I believe that I will be able to maintain perspective as I spend time with God daily - thinking about Him, talking to Him, reading his Word.

I would like to refer back to Psalm 23. David says, "The Lord is my shepherd; I shall not want." David says that having God, to him means having everything. There are many things that I want in 2013, but if I have the Lord, I already have everything that I need. Elsewhere David says, "Delight yourself in the Lord, and he will give you the desires of your heart." (Psalm 37:4). When your focus is on God, He will take care of your needs and even give you lasting joy and peace. The rest of Psalm 23 explains how God takes care of our needs. He gives us peace, He leads us on the right path, He guides us during suffering and He deals with our enemies.

It is very nearly midnight, and fireworks will soon signal the end of 2012, and the beginning of a new year. I pray for myself and for you that 2013 will truly be a year of new beginnings, that we may daily experience new depths in a personal relationship with God himself.