Difference between revisions of "Team:Newcastle/Code"

Line 139: Line 139:
 
     <script type="text/javascript" src="https://2018.igem.org/Template:Newcastle/JSmain?
 
     <script type="text/javascript" src="https://2018.igem.org/Template:Newcastle/JSmain?
 
     action=raw&ctype=text/javascript"></script>   
 
     action=raw&ctype=text/javascript"></script>   
 +
        <script>
 +
var coll = document.getElementsByClassName("collapsible");
 +
var i;
  
 +
for (i = 0; i < coll.length; i++) {
 +
  coll[i].addEventListener("click", function() {
 +
    this.classList.toggle("active");
 +
    var content = this.nextElementSibling;
 +
    if (content.style.maxHeight){
 +
      content.style.maxHeight = null;
 +
    } else {
 +
      content.style.maxHeight = content.scrollHeight + "px";
 +
    }
 +
  });
 +
}
 +
</script>
  
 
</html>
 
</html>
 
{{Newcastle/footer}}
 
{{Newcastle/footer}}

Revision as of 23:18, 13 October 2018

Menu
Alternative Roots/Code

NH-1

Software

Adaptability was a major issue with the existing plant growth infrastructure within the University and, in fact, with many traditional growth facilities. We designed the NH-1 to combat this. The NH-1 is controlled entirely by an Arduino micro-controller. The Arduino offers a low-cost, easy-to-use solution to control and adapt the function of the LEDs. The Arduino also offers an open-source electronic prototyping platform and offers plenty of opportunities for further development of the NH-1, in terms of user interface and interaction. All the code and the IDE are freely available online and the UNO board can be purchased online from Arduino for less than £20. The Arduino language is based on C/C++ so it is incredibly easy to become familiar with, especially if you already have experience with C/C++ but if not there is a wealth of resources online that can help with this. We have designed a guide to using the IDE and included some examples of the capabilities of the NH-1. Some of the features that you can incorporate include:

  • Solid colours across the system
  • Cyclically varying colours (rainbow) in the system
  • Linear gradients of colours across the system
  • Colours can be defined by RGB, HSV values or HTML standard
  • Brightness can be varied, for example to simulate a day/night cycle or a gradual sunrise/sunset

The list goes on as the possibilities with the NH-1 are incredibly varied. This makes it the ideal system for plant-based experimentation, with the added bonus that the system is completely contained and portable. The end result is a highly adaptable, semi-autonomous system that is simple to code and even easier to run.





REFERENCES & ATTRIBUTIONS

Attributions: Umar Farooq, Luke Waller