Yu Jiang Tham

Dream it. Build it.

Build your very own drink mixing robot! (part 3)

Welcome to part 3, the final part of this series of tutorials, on building your own drink mixing robot.  Hopefully by now you’ve built the robot and gotten a little bit familiar with the code.   This part of the tutorial will go over the general operation of the robot, alternative designs, and parts of the code that are unfinished.   If you are just joining us in this post, here is the video again to get an idea of what we’re discussing:

Navigation:

 

Adding Ingredients

In order to add ingredients, you have to add pumps.  The ingredients and pumps match in a left-to-right fashion (if you are looking at the machine straight-on).   To get to the pump controls, use the PUMP button in the top-right of the UI.

splashscreen

When the PUMP button is pressed, it opens up the pump controls, which look like this, minus the numbered buttons:

pumpoperation

The (+) button will add a logical pump to the end of your list of current pumps, while the (-) button will remove a logical pump from the end of the list of pumps.  You can add as many logical pumps as you want, but they will only work with the number of physical pumps that you have.  Information on adding more physical pumps is in a section further down.

Numbered buttons in the pump controls correspond to the pumps on the machine.   They allow you to activate an individual pump (or all pumps at once with the All button) for either debugging or cleaning purposes.  Using the same control again will deactivate the pump.

 

Adding Drinks

To add drinks, point your browser to http://localhost:3000/add after the app has been started up.  You should see a page that looks like this:

adddrink

The Name field corresponds to the name of the drink that will be displayed to the user.  The filename field is the name of the image used.  If no image is specified, a generic image will be used.  Ingredients for the drink (an unlimited amount) can be added via the (+) button, and specific ingredients can be removed via the (-) button to the right of the ingredient.

Images are to be placed in the /public/images/drinks/ directory.

Drinks amounts are specified in a relative basis.  This means if you have a drink with two ingredients (A and B), { A: 1, B: 2 } is the exact same as { A: 5, B: 10 }, which is the exact same as { A: 0.25, B: 0.5 }.  This is because the software normalizes the amounts before calculating how much to be dispensed based on the desired size set by the user.  There’s no need to worry about units of measure, just make sure the ratios are correct!

When you click the Add button, there is no confirmation that the drink is added; the form will be cleared.  I have not added any code in for this yet, so if you would like to add it in, please send a pull request.

 

Editing Drinks

Drinks can be edited at http://localhost:3000/edit

editdrinks

You can edit drinks in this section.  Click the Save button to the right of the drink that you want to edit after you are done editing.  Again, there is no confirmation that it has been edited.  Additionally, this page does not yet allow you to delete drinks or add/remove ingredients to a current drink.  These have not yet been added, so if you would like to send a pull request for these, I would also appreciate it.

 

Further Modifications

If you’d like to increase the number of pumps that are supported, you’ll have to modify the code in two places (noted in teal below), both in the backend.js file:

public/javascripts/robot/backend.js
 pump0 = new five.Led(7);
 pump1 = new five.Led(6);
 pump2 = new five.Led(5);
 pump3 = new five.Led(4);
 pump4 = new five.Led(3);
// Add new pumps here
// You may want to change the pin numbers as well

...

exports.usePump = function (pump) {
 var using;
 switch(pump) {
  case 'pump0':
   using = pump0;
   break;
  case 'pump1':
   using = pump1;
   break;
  case 'pump2':
   using = pump2;
   break;
  case 'pump3':
   using = pump3;
   break;
  case 'pump4':
   using = pump4;
   break;
// Add new pump-strings here as 'pump5', 'pump6'...
  default:
   using = null;
   break;
 }
 return using;
}

 

Alternative Designs

There are a few alternative designs that you can use for this robot.  Instead of using 5 transistors and 5 resistors, you can use a single ULN2803A darlington transistor array (thanks CaTiO).  Also, instead of using a computer running node.js, you should be able to simplify the design to a Raspberry Pi.  However, I have not had any experience with the Pi yet.

 

3d Printer

A word about the 3d printer I used.  It is a Makerbot Replicator 2X and I have been very happy with it.  I’m not sponsored by Makerbot at all, but I just think that the machine is splendid and has given me very little trouble (compared to the Printrbot Simple that I had before it–I guess you get what you pay for).  I have enjoyed using it immensely.  I print with ABS plastic from SainSmart and I find that it works pretty well.  The issue that I have with it is that the spool does not fit the spool holders that come with the Replicator 2X, so I had to use a custom holder that was on Thingiverse.

 

Well, that’s all.  Thanks for taking the time to read through my post.  Hopefully you have learned something; I know I have definitely learned a lot in the process.  If you have any questions or comments, don’t be afraid to add something to the discussion below.  Thanks!

Navigation:

 

97 Comments

  1. Thanks again for all this. Your posts have so far encouraged me to take up soldering, Arduinos, Rasberry Pis and electronics.
    Two question though:
    It seems the pump and ingredients controls are always available in the web page for setting up the system. Is there any way to hide them so anyone else using it cannot alter the settings especially if they can connect up using any web-based device. I work a lot with end-users and if they see something their instinct is to click on it so I would prefer to be able to have it only show in an admin page or somehow protect it from accidental changes.
    Also I’m using the faster RS-360SH pumps that were commented on in the first part; partly for speed but also because they were much cheaper and also available in the UK wheras peristaltic pumps are not. This may turn out to be a bad idea 🙂
    How can I adjust the amount of time that the pumps are activated for so I don’t end up pouring a huge drink when selecting the small size. Current estimate is that I might get 5-7 times as flow rate as the peristaltic although I’m trying to reduce that using a lower voltage on the pumps. On a related note Is it easy enough to alter or expand the drink size selection from 40/200/500 to say 40/100/200/500 or other figures
    Thanks
    David

    • Hey David, sorry for the late reply. It’s been kinda crazy around here. So if you’d like to adjust the flow rate, you can do so by changing the ‘time’ values in $scope.sizes inside /public/javascripts/controllers/DrinkController.js (lines 18-22). Those are total pump time milliseconds (aka if 1 pump is running, the amount of time it would pump is 18000 ms, but if 2 pumps are simultaneously running, they would pump in parallel for 9000 ms, 3 pumps for 6000 ms, and so on). Just modify those values in accordance w/ whatever your real measured values are. 🙂

  2. Not sure what i’m doing wrong but i can select the drink and add pumps but”select a size / MAKE” is not clickable.

  3. i’m so confuse with the wiring and diagram, i have two pump setup as a test, one pump connect to pin 06 (pump 0) and another pump to pin 05 (pump 1) but when i make a drink using the two pump logs show pump0 starting but motor never spin and then pump1 starting which the motor does come on but the motor is connect to pin06 which belong to pump0 not pump1.

    and i just can’t get both motor to work only one will work at anyone time. help!

    • Hi Jason, the easiest thing to do is to start off w/ 1 pump only. The wiring diagram is the same thing repeated 5 times, so if you get one working correctly, you should be able to duplicate it 5 times. Unfortunately, what seems to be happening is that you didn’t do one pump correctly yet. Try starting over and just doing one part of the wiring diagram first before duplicating it for the other 4 pumps.

    • Jason

      I ran one pump only on pin 06 and it is the second pump called pump1.
      The first pump is pump0 which should be pin 07:
      First pump – Pump0 – Pin 07
      Second Pump – Pump1 – Pin 06
      Third Pump – Pump2 – Pin 05
      etc

      David

      • I’m not sure what I can tell you except to double check your wiring. If it works for one, it should work for five.

        • David / Jiang

          Thanks for your reply i was able to correct my pin allocation, i think what threw me off was when you click the + to add the pump it start at 0 and Jiang part 1 JPG pix with single motor he had it on pin06 and somehow that just stuck, I got all five motor working now.

          anyway, i know you mention you didn’t put in error checking and things like that but this is kind of a big deal.
          When i select two pumps lets say vodka and orange juice and select caribbean bliss which has three ingredients and hit MAKE it crashes which is kinda of a problem, I posted the error log below.

          [PUMP] Starting pump1
          [PUMP] Starting pump0
          [PUMP] Starting undefined

          /Users/jason/Desktop/Projects/barmixvah/public/javascripts/robot/backend.js:47
          p.on();
          ^
          TypeError: Cannot call method ‘on’ of null
          at Object.exports.startPump (/Users/jason/Desktop/Projects/barmixvah/public/javascripts/robot/backend.js:47:5)
          at pumpMilliseconds (/Users/jason/Desktop/Projects/barmixvah/public/javascripts/robot/backend.js:38:11)
          at null._onTimeout (/Users/jason/Desktop/Projects/barmixvah/public/javascripts/robot/backend.js:31:9)
          at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
          [darwin:~/Desktop/Projects/barmixvah] jason% node app.js

          • Haha, that’s odd. It shouldn’t show a drink if it has 3 ingredients but you only have two pumps. Not sure why that is happening. Are you seeing drinks w/ more than 2 ingredients if you have 2 pumps?

          • it’s showing up any drinks that has vodka. so if i select just one pump and chose vodka i’m getting all drinks that has vodka showing up.

          • I am having the same issue can you tell me how did you solve this?
            Please?

  4. This is not my area of expertise but it would be incredible to have our own drink mixing robot. I am sharing this with my friend Marc, who is a whiz at this stuff. I can’t wait to see this in action!

  5. I’m not sure if it’s just me but it seem like only two drinks size is working correctly.

    screwdriver drink time test. 40ml takes roughly 15 seconds to dispense and 200ml and 500ml both took the same amount of time to dispense 1 min 15 sec.

    • To be honest, I’m not sure why it’s not working correctly for you, as I have no issues on my side. That is very odd. What does the Javascript console say when you make the drink? There should be a “Time to Dispense Drink: _____ms” log print. Does it print the same thing for 200 and 400ml?

      • Thanks for the reply think i might have to grab a new clone from github and startover, currently testing on ubuntu but will retry on OSX.
        here’s the console output. For me it seems the 500ml click will duplicate the previous drink setting.
        btw, i’m really learning a lot from this project.

        “Making Drink”
        “Time to Dispense Drink: 14823ms” (40 ml click)
        “Making Drink”
        “Time to Dispense Drink: 74119ms” (200 ml click)
        “Making Drink”
        “Time to Dispense Drink: 74119ms” (500 ml click)
        “Making Drink”
        “Time to Dispense Drink: 14823ms” (40 ml click)
        “Making Drink”
        “Time to Dispense Drink: 14823ms” (500 ml click after previous 40ml)
        “Making Drink”
        “Time to Dispense Drink: 74119ms” (500 ml click again)
        “Time to Dispense Drink: 14823ms”

        • same problem on OSX, but was able to fix by reducing view/index.jade from 500ml to 400ml. don’t know why but it works for me.

          div#sizeSmall.drinkSize(ng-click=”selectSize(’40’)”) 40ml
          div#sizeMedium.drinkSize(ng-click=”selectSize(‘200’)”) 200ml
          div#sizeLarge.drinkSize(ng-click=”selectSize(‘400’)”) 400ml

          • Sorry, you have to get the drinkSizes to match the .size values in the object $scope.sizes. The implementation of this is not very well done, but I was doing it in a hurry and had meant to come back to it to fix it but it kind of slipped under the radar. 🙂

  6. Been playing with the code, learning a lot in the process. But I believe I found a bug in the software. In DrinkController.js for the drink filter on line 153 you have this:
    if (ingredientsContained >= numIngredients || ingredientsContained >= numPumps) {

    Which I believe is the source of the error where drinks show up if all your pumps have ingredients for a drink, but you don’t have all the ingredients. ie: You have vodka and it will let you make any drink with vodka in it; even tho you only have one ingredient.

    I changed that line to:
    if (ingredientsContained >= numIngredients) {

    And it seems to be working perfectly now.

    Would like to here if anyone finds an issue with what I changed.

    Thanks again for this!

    • Hey, thanks for pointing that out. I believe it should actually be: ingredientsContained < = numPumps, not greater than.

      • Oh that makes more sense. Why bother checking the rest of the ingredients if you’ve already exceeded the number of pumps.
        I’ll change that and test it out, seems like it’ll work just fine tho.

        • You’re right, we can check the number pumps (minus number of duplicates) against the number of ingredients before checking the rest of the ingredients. Great catch! 🙂

          • Just wanted to update for anyone else reading this. Changing it to ingredientsContainted = numIngredients) { Existing FOR loops }

            ^just off the top of my head, and its early so I could be wrong again with the pseudo code.

          • “Just wanted to update for anyone else reading this. Changing it to ingredientsContainted = numIngredients) { Existing FOR loops }

            ^just off the top of my head, and its early so I could be wrong again with the pseudo code.”

  7. Ok I give up… That ^ is not what I had written out…

  8. Got mine working and been testing for a couple days now. Question for anyone else thats got one going. If I try and pump soda it flattens it out really bad. I am using the RS-360 pumps mentioned earlier. Cheap and fast pumps on 5 volts. Wondering if the peristaltic pumps are a better at not flattening soda? Diet sodas pump ok but get flat, regular coke does not pump well at all because of all the carbonation.

    Ideas???

  9. Hello Yu Jiang,
    This may be somewhere in your instructions and I have missed it, but is there a way to expand the number of ingredients beyond the preset list?

    • In the ‘drinkController’ script the preset ingredients start at line 39. If you add in an ingredient there it will show up in the drop downs and be usable for drinks.
      On my list of mods is to have the ingredients stored in the database to support substitute ingredients….

      • Thank you so much for the information! I have a slight problem with using developer tools though. When I add in the ingredient, then press ctrl+s, it says “Recompilation and update succeeded.” If I then check the list of preset ingredients, it has not changed, and if I reopen developer tools, my changes are no longer there! Am I saving it wrong, or just screwing up completely? Thank you for your help.

        • Not sure what you mean by developer tools? I am using webstorm as a code editor. And I don’t need to save just refresh the Web page.

          Did you follow the format of the other ingredients in the list? Ie.. ‘ingredient’, and ending the line with a ;?

  10. My partner and I stumbled over here by a different web page and
    thought I should check things out. I like what I see so now i’m following you.
    Look forward to checking out your web page yet again.

  11. Terrific work! This is the type of information that are meant to be
    shared around the web. Disgrace on Google for now not positioning this submit
    upper! Come on over and talk over with my site .
    Thank you =)

  12. Hello there, You have done an incredible job. I’ll certainly digg it and personally suggest to
    my friends. I’m sure they’ll be benefited from this web site.

  13. Hi, I added drinks but they do not appear on the page. Any of you had the same issue?

    Thanks

    • Hey Manuel, did you match the pumps to the ingredients of the drinks that you added? They won’t show unless all of the ingredients in the drinks are presently set in the pumps.

  14. Thanks for ones marvelous posting! I truly enjoyed reading it, you happen to be a great author.
    I will remember to bookmark your blog and may come back down the road.
    I want to encourage continue your great posts, have a nice day!

  15. This article provides clear idea for the new visitors of blogging, that
    in fact how to do running a blog.

  16. Hallo everybody,

    I will test this incredible project on my ubuntu server without an arduino. I have comment out the lines for the johnny-five part. i think my mongodb runs but if i start the app with node app.js my browser said connection refused. Can anybody help me with this problem?

    Thanks

    Kai

  17. I had this working on a Windows 7 machine but I’m trying to get it working on a Pasberry Pi. So far so good but when I add in pumps and ingredients it’s showing drinks that it can’t make.
    This seems to be a feature if I only have a small number of ingredients which I never tested on the Windows setup so probably existed there too.
    Using your initial database of drinks and adding just 2 pumps with Rum and Coke as ingredients I get the expected Rum and Coke drink but it also shows a Long Island Iced Tea and Texas Tea which both have the 2 available ingredients but also several more.
    If I add a 3rd ingredient that isn’t used by any drink in the database it seems to fix it and show just the Rum and Coke drink. It seems if there are drinks that have all the ingredients available plus a few more it shows them. Having some of the ingredients plus a few more it doesn’t show them.
    I read the posts about line 153 in DrinkController.js but the suggested changes in those posts just make it worse.
    It’s not a problem in practice since with several pumps (5-10 )you’re not likely to have something that has all the pumps plus more ingredients but it’s bugging me 🙂

    • Hmm, very odd. It doesn’t seem to be happening to me, so to be honest, I’m not sure what is happening on your end. You might just have to poke around in the code a bit (all of the logic is in the code in and around line 153). Otherwise, you might have to delete the drinks from the database…

  18. Could you add a digital scale to the drink holder, so if say a cocktail required a certain glass you can put the glass on there, if it required ice prompt you to put ice in it, and then proceed with mixing, I’m still trying to get my head around the ratios, how do you get 30ml or 15ml or is that the parts based on 15 ml being 1 part, 30ml being 2 parts.

    I have been looking for an excuse to buy a 3d printer ;P and I do love the pi, and well having family over at Christmas, there is quite a few Japanese Slippers being made ;P

  19. Hi! Great project!
    When will be some updates? such as fixing Edit +/- buttons?
    Thanks!

  20. Hi Guys, did anyone get it working on a PI, a few said they did, any links ????

    • Errol

      I got this working on a PI. The image is available here:
      https://app.box.com/s/b992cuplwvsf9egoygpg
      I had to split the image so it’s 8 x 240Mb files.
      Disclaimer – I’ve never used a Pi before doing this so may not be the best setup but it works. I kept everything standard where possible and you can remote on using windows remote desktop.
      I set it to start mongo etc on startup so it should be ready to go. I can’t remember exactly how I did this but as soon as I have time I’ll try and post up teh instructions I followed.
      One problem I do have is that node is using all available spare cpu. I’ll look at this in due course but it doesn’t seem to slow anything down. If you or anyone else manage to figure out a fix please let me know.

      David

      • Hi David,
        Thank you for the link and of course your time and effort, I will download and try.
        Thanks again

      • Hello David
        And now two Years ago i have a Question :-))
        I have tested your Image on Rasperry 1 but my Problem is Where ist the Directory for the DB from drinks.js ??
        i will Change the drinks 🙁

        greets Joe

  21. Anyone interested in selling me the plastics parts? or the whole robot?

  22. In terms of future modifications, have you experimented with a pod based flavor system to reduce the number of bottles of ingredients required?

  23. all good until is time to make the drink i get this error

    TypeError: Cannot call method ‘on’ of null
    at Object.exports.startPump (/Home/Ernesto/barmixvah/public/javascripts/robot/backend.js:54:5)
    at pumpMilliseconds (/Home/Ernesto/barmixvah/public/javascripts/robot/backend.js:45:11)
    at null._onTimeout (/Home/Ernesto/barmixvah/public/javascripts/robot/backend.js:38:9)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
    Ernesto@ernesto-virtualbox:~/barmixvah$

    running on a virtual machine with Zorin as OS

    any help will be great
    THANKS

    • Oliver Gerrard

      May 27, 2015 at 1:54 pm

      Hi,

      Do you have the electronics working as shown?

      I’m looking for help with this as all my pumps activate at once. Also, have you had a problem of ‘{“error”:{“name”:”MongoError”}}’ when adding a drink?

      Many thanks,
      Oliver

      • have you fix your problem yet?

      • if you have all the transistors together like in the picture , that’s the problem as long as the metal back part of the transistor (collector) are touching each other as soon as one pump turns on all of the one that are touching are going to turn on too

  24. Oliver Gerrard

    May 27, 2015 at 3:53 pm

    Hi!

    Can anybody please send me a picture of their wiring so I can check with mine. Something is wrong as the bar isn’t detecting the pumps but I’m an amateur and could do with the help!

    Oliver

  25. I’m trying to run some test drinks and when I add a drink and try to save I get, ” ‘{“error”:{“name”:”MongoError”}}’ , how can I fix this?

    Thanks.

    • I figured it out. Mongoose is needed to communicate with Mongodb so I needed to install Mongoose via terminal with the command: npm install mongoose
      Once it’s installed then you can start Mongo & node app.js and the creation of the drinks will succeed.

      Hope this helps anyone else.

  26. I tried the npm install mongoose both on my account and as an admin in the cmd prompt and it scrolled several lines about the install and then gave some errors. I still get the error when I try to add drinks on the web interface. any ideas on why it wouldn’t install mongoose on my machine like it did yours or any other reasons I would be getting that same error as you when trying to add drinks?

    • nevermind. I installed it from the barmixvah directory and then it worked. thanks for that. testing on my laptop now, but want to transition to a RPi and make it a self contained unit.

      • I tried the RPi image linked to above in the comments and it didn’t work. It wouldn’t even start a boot sequence. I have been attempting to install everything on a Pi and have not been able to get it working. I was able to get a working version of MongoDB working on the Pi and node.js, but then I couldn’t get anything to work out of the barmixvah directory. Does anyone have it working and willing to post an image for others to use?

  27. Hello together,

    I build one and it is really great. Maybe one of you can help by a litle problem. Is it possible to delete added drinks or reduce the incredients? The minus button isn´t woking for me. Thanks in advance.

    Greetings Sebastian

    • Hey I was wondering if you could help my partner and I with our barmixvah project. We have the 3D printed parts and schematic built. All we would need help is getting the software portion up and running. We wanted to know if you could skype with us anytime this week or any time your available. Thank you and we hope to hear from you soon.

    • He has not built in that in the code. I made my modification self, i did it possible to add ingredients thru a webpage instead of in the code, and im working on to delete and get the + – button to work.

  28. thank you .. this is very helpful, but I want to try new things to make Barbot based Raspiberry-pi. whether it can work and succeed .. please help me, this is relating to my final project,.

  29. Great Project . I build one for our Scouts Partyroom. But where can i found /change the ingredients list . I wanne add More like Absinth and want to translate the rest .

    btw happy new Year ^^

    Greetings Stefan

    • Hey I was wondering if you could help my partner and I with our barmixvah project. We have the 3D printed parts and schematic built. All we would need help is getting the software portion up and running. We wanted to know if you could skype with us anytime this week or any time your available. Thank you and we hope to hear from you soon.

  30. The exit pipe seems to create a suction similar to having your finger on the end of a straw – The fluid stays in there… How did everyone bypass the time it takes the fluid to reach the end of the pipe?

    In theory if my exit pipe is 10 feet long (not saying it is) and I only need say 10ml of that particular liquid for my drink – That liquid may never reach my glass but will still be in that pipe

    Is there a section in the code that allows the pump to run x amount of seconds to get the fluid to the end of the exit pipe?

    • Hey John,

      I made a drink with similiar amounts of incredients. That means I have taken the first 6 incredients (because of 6 pumps) and made a cocktail named initialization. It is not an elegant way, but so you can fill up the pipe at the same time with all incredients.

      Greetings Sebastian

      • Hey Sebastian,

        Thank you for the reply! That is actually genius. I will try that out later this week.

        How has yours or anyone’s luck been with sending carbonated drinks? Mine seems to flatten then out a little bit

      • I use the pump and start all pumps to fill upp the pipes.

  31. I was so excited to get the web app running, but I can’t load the drinks in. Has anyone else had problems with getting the drinks.json file into the db? I have been able to initialize monogo successfully (port 27017), but can’t load in the drinks with the command specified in the readme. Please help!

  32. Awsome project!
    Im making one with 10 pumps, touch screen and a custom made design. Software running on Raspberry Pi 3 and arduino mega to drive all the pumps.

    Im also going to learn how to modify the software becouse i want a description on each drinks so i can write if the drinks need lemon or someting like that.

  33. Im, made some modifications in the script. Sins the code has not been updated for a long time i did the modifications self.
    First i added an description field to all drinks.
    Then i added a new table for ingredients so i can just go to localhost:3000/addin to add more ingredients instead of modify the code. So i have updated the ingredients list in index and add/edit page to use from the database instead.
    I have not yet made it possible to delete and use the + – in edit, but i will do it also.

    If someone is interesting in the code just let me know.

  34. For my modified version, please go to https://github.com/awoalarm/barmixvah if you want to be able to delete drinks, and also add ingredients thru a page instead of in the code, also there is an description field for drinks.

    • I tried your modificated version but it does not work, when pointing to /addin I get a not found error.

      • Hello Andreas

        Your Version It´s wonderfull working here .

        Thanks!!!!!!!!

        • What distro and version are you using?

          I´m tring on Ubuntu 16.04

        • Thank you 🙂 I did my best even it’s the first time I’m working with this, normally I’m use to work with php and python 😛 I’m running on Raspberry Pi 3 and raspbian.

          • Hello Andreas.
            I want to build the drinking robot using a Raspberry Pi 3 and Raspian too.
            I have some problems to figure out, wich revisions of MongDB, nodejs are the right ones.
            Another issue is to get the Teensy 2.0 working with nodejs/jonny-five. But this is not a problem really, I can buy a arduino board instead.
            Hope you can help me 🙂

  35. Hello Andreas

    Can you post Your Rasbian Image with your new Code ???

    Greets JoeM

  36. Thank you for this great series of blog posts, I have recently got this up and running on a Pi. This is a great project, well documented and easy to follow, it also helped increase my Linux and electronics knowledge.

  37. Does anyone know how to get MongoDB on a RPI? I have a 3 model b and cannot get it to work, same with node. Also, has anybody done this on Windows? I can’t get it to work.

    Thanks,
    DJ

  38. I keep getting this error, does anyone have a fix?

    Code:

    the_catster@TheCatstersHackerSpace:~/barmixvah$ node app.js
    { [Error: Cannot find module ‘../build/Release/bson’] code: ‘MODULE_NOT_FOUND’ }
    js-bson: Failed to load c++ bson extension, using pure JS version
    info – socket.io started
    events.js:141
    throw er; // Unhandled ‘error’ event
    ^

    Error: failed to connect to [localhost:27017]
    at null. (/home/the_catster/barmixvah/node_modules/mongodb/lib/mongodb/connection/server.js:556:25)
    at emitThree (events.js:97:13)
    at emit (events.js:175:7)
    at null. (/home/the_catster/barmixvah/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
    at emitTwo (events.js:87:13)
    at emit (events.js:172:7)
    at Socket. (/home/the_catster/barmixvah/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at emitErrorNT (net.js:1256:8)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickDomainCallback (node.js:396:17)

Leave a Reply

Your email address will not be published.

*

© 2017 Yu Jiang Tham

Theme by Anders NorenUp ↑