Which language should I use for my project?

10 replies
Hello, I am trying to do a project where I want to read temperature/humidty using DHT22 and send it to an online database (MongoDB Atlas) from my pi (Pi 3B+) every hour. I also thought about serving it through a static IP instead of sending it to an online database, but that option is not available.

I did some research on which language, frameworks and libraries to use and basically narrowed down to 4 languages:

- C/C++ : using WiringPi (although deprecated) and MongoDB Driver in C or C++

- Java : using pi4j and MongoDB Driver in Java

- Python : using pigpio or rpi.gpio (w/ DHT lib) and PyMongo

- Javascript w/ Node : using Onoff and Mongoose

I'm comfortable with everything except Python as I have never used it before. This is my first project with the rpi so the choice of libraries that I have listed above might be total bs. For example, I'm not sure if MongoDB Atlas is a good choice so please let me know if there is a better option.
#language #project
  • Profile picture of the author kopatech
    MongoDB is better solution for data base sections .
    {{ DiscussionBoard.errors[11608670].message }}
  • Profile picture of the author majento
    Delphi, PHP - everything is enough to create high-quality applications and web services
    {{ DiscussionBoard.errors[11610292].message }}
  • Profile picture of the author Dororall
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[11611179].message }}
    • Profile picture of the author gigapothem
      You absolutely can learn by yourself! It's mildly frustrating at first, especially if you're brand spanking new to coding, but if you keep at it, it will make perfect sense.
      I would recommend starting out with the language that the app company is using, so you can learn and see real world examples at the same time.
      Let me know if you need some more help!
      {{ DiscussionBoard.errors[11612495].message }}
  • Profile picture of the author gigapothem
    As someone who is fluent in Python and has lots of experience with Java and Javascript, I would push you towards Python, because it's the easiest to read!

    But in all seriousness, use the language you're most comfortable with, unless you don't mind the challenge of learning the language and interfacing with a database with said language. Not to mention, if you want to host the language onto a website, you'll want to do it through a web framework of some sort.

    As for the database, there really isn't a "best" one to go with, they all have their use cases. This would expand into whether you really need a nosql database over a relational. This can be answered by:
    1) What kind of data are you pushing to the database?
    2) How are you using the data from the DB?

    I've used MongoDB in the past and I hate interfacing with it in Python because of some very annoying nuances, but it is still a good DB. I personally prefer Postgres, because I deal with it everyday and find it more flexible for my needs.

    Also, just a heads up, MongoDB Atlas is just a managed cloud database solution offered by MongoDB, not sure if you were aware of that or not.
    {{ DiscussionBoard.errors[11612496].message }}
  • Profile picture of the author susan2015parker
    Hello, if you have a grip over all the language, you can easily learn PHP. The benefit is that it would be easier to code and make a web application. Otherwise, you can also go for PHP or MongoDB as these are best for developing top-notch web applications.
    {{ DiscussionBoard.errors[11622174].message }}
  • Profile picture of the author BerthaCuuler
    I would recommend Java first or otherwise C++.
    {{ DiscussionBoard.errors[11628781].message }}
  • Profile picture of the author Embedded School
    Hi, preferring python would be the choice. Since you aren't interested to do. But if you go with python it would be a better option for easy understanding.
    {{ DiscussionBoard.errors[11629854].message }}
  • Profile picture of the author mohammad umer
    C++ Language
    {{ DiscussionBoard.errors[11632576].message }}
  • Profile picture of the author Zoran CrewNew
    PHP = Laravel
    Javascript = Node js
    {{ DiscussionBoard.errors[11632960].message }}
  • Profile picture of the author maczfitowiec
    Imo Java. For me it is much easier to write in it.
    {{ DiscussionBoard.errors[11633478].message }}

Trending Topics