I’ve gotten a few people posting comments on the “register” page that are mostly general questions. This prompted me to add an “Ask Bill” page to provide a more appropriate place for you to ask me questions.

If you have a question about a certain library or project of mine, I’d rather you ask the question in the comments of the related post. If it’s a general advice question, I’d rather you use a public forum like Society Of Robots or theĀ EEWeb Forum

Otherwise, feel free to drop any questions on the comments here. You do have to provide an email address, but this is only to fight spam. I can’t promise speedy replies though.

Bill

 

DO NOT ASK QUESTIONS ABOUT MY ARDUINO LIBRARIES OR PROJECTS HERE!

Use the comments on those pages to ask questions about specific libraries and projects.

Share
  1. 79 Comments.

    • alameriNo Gravatar says:

      Hello Bill

      I am fascinated by your projects!!! Keep up the good work!

      I am working on a school project and I might need some direction from an expert such as yourself

      Please if you feel that you have time, send me an email
      osaalameri@pi.ac.ae

      Thanks again for your wonderful website and libraries

    • MarisaNo Gravatar says:

      Hey Bill – I am currently working on the SONAR for a submarine as my electrical engineering senior project. If you have any tips (I originally found some on societyofrobots.com, ie. multi-path interference), it’d be most appreciated!

    • BillNo Gravatar says:

      Hi Marisa,

      Sonar is a tough cookie. I am also an active forum member @ Society of Robots, so I may have been the one talking about it there.

      Multi-path is the bane of most RF and acoustic engineer’s existence. I can give you tips, but you would have to tell me more about your project. Are we talking pool or ocean? Sonar just for distance or for mapping?

    • BillNo Gravatar says:

      Tom, I moved your comments and my responses to the post about the library so others could see it.

      http://www.billporter.info/playstation-2-controller-arduino-library-v1-0/comment-page-6/#comment-994

    • SteveNo Gravatar says:

      Bill,

      Here’s what we were able to do with your PS2 code.

      http://www.youtube.com/watch?v=WP2yqu1Rs_M

      Still needs some work to optimize the response but it certainly proves the concept.

      Thanks for the help.

    • AquibNo Gravatar says:

      Hi Bill,
      You article and library for interfacing a PS2 controller to a microcontroller was helpful. Do you by any chance have the communication protocol for the PS2 controller??

      Cheers
      Aquib

    • BillNo Gravatar says:

      Aquib,

      You can find a good overview of the protocol here:

      http://store.curiousinventor.com/guides/PS2

    • Alright, so I have a very basic question that I think you could answer for me: what is the best way to do PWM? I’ve got a 50% light level by some basic code that starts a loop, turns on the LED, reads a sensor, uses that value to Wait, turns the LED off, re-reads the sensor, Waits that value, the repeats.

      When the sensor returns a small number (like around 1 or 2) I get a decent 50% brightness. But what Wait value(s) do I need to change to change the brightness? All I can do is make it blink slower and faster. :(

      DS(delete this part)homebrew.Jordan@Gmail.com

      • BillNo Gravatar says:

        Jordan, instead of reading the sensor twice during an on/off cycle, read it once. Use that reading to set the time on vs. the time off. So if the reading is ’1′, stay on for 1, off for 254. If it’s ’200′, stay on for 200 and off for (255 – 200 =) 55.

        • JordanNo Gravatar says:

          Ahhh, thanks very much. I was looking around more on the net and found some people who were helping me, apparently there’s a formula for percentage of brightness or something. This really helps, thanks again!

    • John LoganNo Gravatar says:

      Bill, sounds like you have a real Heart for helping others as I do myself. I have always wanted to build a “Dancing Robot” to spark the interest of young kids and bring them togather with a common interest. I am new to the Axon MCU but it seems like an excellent MCU do do the job. Servo’s that handle larger loads can get expensive. In short, I would like to build a 5ft. Dancing Robot and would like your opinion on Sofware and Servo’s so I won’t get bottle-necked mid way through the project. I will build the frame out of Aluminum.
      Thanks for your time,
      John.

      • BillNo Gravatar says:

        John, what you are asking is extremely complex. Toyota has spent many years and millions of dollars to build a humanoid robot and it can’t even handle stairs that well.

        I’d start smaller, join a community like Societyofrobots.com, and work your way up first.

    • Ike CoffmanNo Gravatar says:

      Hello Bill. I am having some trouble doing the physical wiring, and I need your help.

      I am using an Arduino, so pin number is an Arduino pin.

      From looking at the program, there is a command that defines clock (blue) as pin 13, command (orange) as pin 11, att (yellow) as pin 10, and data (brown) as pin 12. This does not work.

      After reading through the program more, the library file uses serial.print and serial.println to communicate with the controller. These are pins 0 (RX, brown) and 1 (TX, orange). Is this right? Or are the pins redefined somewhere else?

      Power and ground are obvious, but how do I know for sure what physical arduino pins to use? It is certainly not spelled out.

      Thanks.

      Ike

      • BillNo Gravatar says:

        Ike,

        This question should have been asked in the comments on the Playstation2 controller library, but I’ll answer it here anyway.

        Nothing from the controller should be connected to pins 0-1 of your Arduino. Those are reserved for the serial communications to the computer via USB.

        Your Arduino should have VCC (5V) and GND pins that are not numbered. This is what you use to provide power to the controller.

    • WyattNo Gravatar says:

      Hello Bill,

      I have used your PSX library as a basis for my own library, adapted for generic AVR use (non-Arduino), and allowing you to use any set of pins on your chip. While based on your work, most everything has changed over the time I was working on it ;-)

      While so far it is only for personal use, I am planning on releasing it under some open source license shortly. A few questions: 1) is your code licensed under any particular license? 2) If not, do you have any preference as to what license I use? I am leaning towards probably Creative Commons Non Commercial / Share Alike / Attribution, but if you feel strongly one way or another I could probably be convinced.

      For your information, you can see the current version on my site at http://digitalcave.ca/resources/avr/psx.jsp

      Please let me know if you have any questions / comments.

      Cheers

      • BillNo Gravatar says:

        Hi Wyatt.

        I put some verbage in my readme but I don’t remember what it was. I’m ok with a Creative Common Share Alike.

        I read your code a bit, can you tell me what “glaring protocol violations” you found from my code?

        • WyattNo Gravatar says:

          Thanks for the reply.

          As for the bugs, the most important (which seems to have improved stability by a large measure) is to read the data on the rising clock instead of falling; a later change was to increase the poll command (0×42) to be 21 bytes long instead of 9; on certain AVR / PSX controller combinations I found that 9 bytes resulted in the analog inputs being read inconsistently and intermittently. By reading the full 21 bytes (even though they are not filled) it appears to work much better. By doing this, plus reading on the rising clock, I was able to completely remove all the non-clock delays.

          Now, to be fair I don’t remember if these were from your library or from a previous revision (I made a number of changes over time, and didn’t do a good job of commenting my changes until later). I may well have introduced these errors myself in a previous version.

          Cheers

          • BillNo Gravatar says:

            The only piece left untouched from the code I started with is the raw comms code, so it’s possible I am reading on the wrong side of the clock. It was never a problem for me so I never messed with it. I’ll have to tweak my code if that is the case.

            In my library, if you initialize it in ‘pressures’ mode, it will configure the controller to use the 21 byte command instead of the 9. It only uses 9 if you don’t init it in pressures mode and don’t tell the controller to expect 21 bytes. That’s always been the case.

            Do you mind if I link to your code from my blog post?

            • WyattNo Gravatar says:

              Yeah, reading on the down clock worked for me on some chips (168), but didn’t on others (644). I really don’t see how that could make a difference, but the proof is in the pudding – one way works on all chips I tried, the other doesn’t. Shrug.

              And as for linking, absolutely! Feel free to link to, modify, copy into your library, etc the code I have. That’s the whole point of OSS code, and I am a strong believer in the power of the OSS community!

              Cheers

    • jasonNo Gravatar says:

      I am thinking about installing some solar hot water panels. Before I do, I would like to understand how much my electric water heater is being used. It is essentially on or off-so if I could some how measure the time it is on, I could figure out how much energy I am using. What’s the cheapest way to do this? I figure some type of power clamp monitoring would work, but I don’t own any power clamps. I am not afraid of installing a direct timer in the 30 amp circuit, but if I would prefer to some indirect measurement. I say your plans on a the whole house measurement, and I may not need quite that capability. Anything simple would be great.
      Thanks,
      Jason

      • BillNo Gravatar says:

        Water heaters are fairly constant for power draw. You could borrow a power clamp meter you could take a one time measurement of how much the heater draws when it’s on. Then you would just have to measure how long the heater is on every day. You could (carefully) wire a datalogger to the output of the water heater’s thermostat to measure how long the heater elements are on each day.

    • Anthony LinNo Gravatar says:

      I’m currently using your PS2 Arduino interface library with a ROV. However the problem is that I’m currently having troubles with interpreting the data and then sending those data within data packets from the topside arduino to the rov side arduino. Currently my structure is sending a sync byte, ID byte, val Byte, then direction Byte. How would I go ahead and send these data packets and then interpret them?

    • KasunNo Gravatar says:

      Hey bill,

      Awesome stuff and some cool projects in there. Have you by any chance documented the parts list for your rover ? Would love to see what you have used there.

      A big fan of your work ;)

      • BillNo Gravatar says:

        Not really, you can look through the various posts with the rover tag, but I really haven’t documented it very well. I need to one day when I get time.

    • prinwibowoNo Gravatar says:

      I am fascinated by your senior design robot. there are a lot of things I want to ask on it. could you help to explain it by mail if you have a little time?

      sincerely yours…

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.