1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Learning to Program

Discussion in 'General Electronics Chat' started by CARRELAND, Feb 13, 2018.

  1. CARRELAND

    CARRELAND New Member

    Joined:
    Feb 13, 2018
    Messages:
    3
    Likes:
    0
    Location:
    West part of France
    Hello everybody,
    I'm a brand new member of this site,which ismy first suscribe on such site.
    I'm 72 soon and I still like electronics stuffs and so, I'm now a retired man who spent his activity life in Radiocoms at the beginning (Wireless coms) and electronic technician all around the world. If my English speaking is not too bad, my writing English is poor, and ask me some efforts to write, anyway I use to read English mostly electronic almost well.
    I'm now involved in a temperature constant system to warm a little geen house to grow tomatoes
    seeds I'll plant in next May in my garden (home grown tomatoes) which my wife will make an excellent ketchUp much more testy than fond in super markets.
    After that I intend to start program PICs, thats a big deal for me,Where the head, here is the tail?
    If anyone could help me, I'll appreciate any help such what is the best programming language to
    learn, simple examples, step by step methods, as a old timer as me needs.
    Thank you to all of you.
    Regards
     
  2. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,366
    Likes:
    368
    Location:
    Brisbane Australia
    Well, I'll be 60 this year and been programming pics for a long time. However, I've just got into Arduino and must say it makes things so much easier. I work one day a week in a local high school and the kids there have embraced Arduino - don't think I could have managed that with pics. Buy a $10 Arduino, download the free software and play. It's a wonderful learning curve.

    Mike.
     
    • Like Like x 1
  3. cowboybob

    cowboybob Well-Known Member Most Helpful Member

    Joined:
    Oct 22, 2011
    Messages:
    3,063
    Likes:
    483
    Location:
    James Island, SC
    Welcome to ETO, Carreland.

    Pommie gave you some good advice.

    An Arduino system sounds ideal for your project and if you're patient, you sound like you have the skills for your task.

    And there are a number of ETO members with plenty of experience to help you when its needed.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. CARRELAND

    CARRELAND New Member

    Joined:
    Feb 13, 2018
    Messages:
    3
    Likes:
    0
    Location:
    West part of France

    Hello guys, thank you to answer so quick, please let me know what Arduino model shall I order and more details.
    Thank you much.
    I'm leaving in the South of Brittanny in France, weather is rainny and temperature is mild for the season (winter on our lattitude!) Weather is crazy as the world generally.
    Have a good day.
    Regards
    Jacques
     
  6. ADWSystems

    ADWSystems Member

    Joined:
    Mar 14, 2008
    Messages:
    731
    Likes:
    9
    Location:
    USA
    I used to built out Intel 80C51 microcontrollers. But laying out the controller, power supply, clock/oscillator and wiring it all together was time consuming for each project. I moved away doing that due to the time overhead. I had several projects that would benefit from a microcontroller and reviewed the pre-fab options available (basic stamp, Arduino, Raspberry Pi, Beagle Bone, etc.). I felt the Arduino had the most add-on hardware modules available and (hoped for) a good support community. That is the route I chose. So far I have not been disappointed. I don't know if the others are better, but I do know the offering on the Arduino is pretty good.

    With that said, I would suggest the Arduino UNO (https://store.arduino.cc/usa/arduino-uno-rev3). Make sure to get a genuine one or you may start two steps behind (https://www.arduino.cc/en/Products/Counterfeit). The Arduino UNO features a built-in USB programming/power port, a bunch of digital input/put pins, some built in ADCs, and a few PWM outputs. It does not have a true analog (DAC) output but I found this one https://www.sparkfun.com/products/12918 and was easy to use. There are also several libraries available for different communication protocols (SPI, I2C, one-wire, and more). There are simple LCD displays readily available and libraries to match. Here is one store I have used for decades (wow am I old enough to say that?) https://www.allelectronics.com/category/936/arduino-compatible/1.html. They have a fair amount of add-ons for it.

    As for your greenhouse project, I would recommend one of two temperature sensors. Either the LM34 (deg F)/LM35 (deg C) and use the Arduino ADC to read the temperature or the DS18b20 and use the one-wire library. Both have plentiful examples on how get them working.

    What is the output if you want to make the greenhouse warmer?

    P.S. My apologies for selecting US based stores, but I think they will give you an idea of what is available and what to look for in France.

    P.P.S. There is a subforum here under microcontrollers for the Arduino line, in addition to the Arduino.cc forum which is specifically for programming the Arduinos (no circuit talk over there).
     
    Last edited: Feb 14, 2018
    • Like Like x 1
    • Agree Agree x 1
  7. N11778

    N11778 Member

    Joined:
    Dec 13, 2015
    Messages:
    39
    Likes:
    5
    Location:
    Apache Junction, AZ.
    ADW what language does the arduino use? guess i could look it up but getting to old to open google :) (heavy book)
     
  8. ADWSystems

    ADWSystems Member

    Joined:
    Mar 14, 2008
    Messages:
    731
    Likes:
    9
    Location:
    USA
    The Arduino uses C and C++.

    Many of the libraries are created using C++. So a basic knowledge of classes and object oriented programming is helpful. One of the first lines you will see is lcd.begin(). Why is there a function call with a period in it? Because is from a library developed with C++. Beyond that all you really need to know is C. For all intents and purposes, I program only in C. I don't see the need for the overhead of C++ for programming a microcontroller, outside of developing the libraries.
     
    • Like Like x 1
  9. schmitt trigger

    schmitt trigger Active Member

    Joined:
    May 24, 2009
    Messages:
    973
    Likes:
    88
    Another option are the PICAXEs.
    They run interpreted BASIC and are slower than your Arduino, but they are also extremely simple to understand and program.

    http://www.picaxe.com/
     
    • Like Like x 1
  10. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,327
    Likes:
    118
    Location:
    Seattle, WA
    Building in what Schmitt Trigger said, a better option for Basic with the Pic18F series chips is Swordfish Basic. The "special edition" version is free for trial; the size limits are so generous that some people never upgrade to the paid version.

    It is a Basic compiler, so the code runs fast, and unlike the Picaxe, you're not paying a surcharge for the language with every chip.

    I'd recommend the PICkit 2 programmer for loading the code into the chip. Chinese clones are about $8 and work well. The PICkit 2 also gives you a simple 4 channel logic analyzer and UART terminal tool.

    I find Basic easy to understand. I have been a Swordfish user since "the beginning" so I must be an advocate.


    On the other hand, like Pommie/Mike, I have recently downloaded the Arduino IDE for use with the ESP9266 wifi chips. I am kind of amazed at how easy it is to try difference examples and find drivers for all the different components and modules you might want to use.
     
    • Like Like x 1
  11. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,973
    Likes:
    297
    Location:
    North west UK
    Welcome carreland, that sounds like an interesting carreer you'v e had, were you armed forces?
    I'm a bit of a tube enthusiast and have a small collection of vintage radio's, sounds like you've probably worked with tubes.
    I'm not your age yet, I'm pushing 50.

    I agree with the comments on arduino, programming them is real easy as there is an extensive set of librarys for them, the software is free and you dont need a programmer, you just plug the 'duino into your usb port.
    That said you dont need to stick to just 1 range of chips, pics/St/8051 etc have their place too, the 'duino has been successful in that it appeals to both seasoned hobbyists and beginners.
    If you go arduino start with an uno rev.3, get a genuine one and a couple of cheapies they are under 5 uk quids, genuines around 15 - 20 Uk quids, in fact you can get a starter pack with the duino/leds/sensors/remote/switches etc and links to documentation with worked examples for 25 Ukp.
     

Share This Page