Which language should I use for my project?

5 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
Avatar of Unregistered
  • 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
    Is it possible to learn programming and coding by myself? I am currently cooperating with the app development company but I would like to try coding by myself someday. By the way, if someone is looking for a good app development company, I can recommend one. To cut the long story short, I am absolutely satisfied with the app this company has made for me. Here is the link, hope it'll be helpful - https://stormotion.io/
    {{ 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 }}
Avatar of Unregistered

Trending Topics