I am new to Arduino and I am trying to get my board to read the temperature, display the temperature and then depending on the temperature show a different colour on the RGB light. Without any of the RGB code it reads and displays the temperature completely fine. Also, the RGB runs if I just run an RGB code. I've been trying to do this for a while now and I really need to get it done.
I have attached my current code as a screenshot to this post. There is usually an else statement where the if is now but it doesn't seem to take the else as a proper statement. The current error is get is:
TypeError: Cannot read property 'type' of null
at Function.Pins.normalize (/Users/NicholasBlount/code/boscode-learn/node_modules/johnny-five/lib/board.pins.js:91:24)
at Board.Component (/Users/NicholasBlount/code/boscode-learn/node_modules/johnny-five/lib/board.js:839:23)
at new RGB (/Users/NicholasBlount/code/boscode-learn/node_modules/johnny-five/lib/led/rgb.js:163:19)
at Object. (/Users/NicholasBlount/code/boscode-learn/code/arduino/01/ardx/CIRC10-code-temperaturesensor.js:4:15)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
I'll happily add any other information needed if I haven't put something in to this post. I'd really appreciate any and all help! Thanks!
Nick
PS I'm using a mac, just so you know