Posted on 8 Comments

How to install NUTTYFI Wifi IoT Board in Arduino IDE

In this tutorial, you’ll learn how to install the NuttyFi boards package in the Arduino IDE using our official Board Manager URL.

If you don’t have the Arduino IDE yet, download it from the official site: https://www.arduino.cc/en/Main/Software.

Board Manager URL (copy this)

https://raw.githubusercontent.com/itsbhupendrasingh/Nuttyfi/main/package/package_nuttyfi_index.json

 

Tip: Arduino IDE supports multiple Additional URLs. Put each on a new line (IDE 2.x) or separate with commas (IDE 1.8.x).

 

If you want to install NuttyFi32 Board in your Arduino IDE, then just follow our another tutorial guide on How to install ESP32 Board in Arduino IDE.

Step-by-Step (Arduino IDE 2.x and 1.8.x):

Step 1: Open Arduino IDE (2.x recommended).

Step 2: Open Preferences

  • Windows/Linux: File → Preferences
  • macOS: Arduino IDE → Settings/Preferences

Step 3: Add the NuttyFi JSON URL in Additional Boards Manager URLs (paste the URL above), then OK/Save.

https://raw.githubusercontent.com/itsbhupendrasingh/Nuttyfi/main/package/package_nuttyfi_index.json

Step 4: Open Boards Manager → Tools → Board → Boards Manager…

Step 5: Search “NuttyFi” → select the NuttyFi package (publisher: SME Dehradun / Schematics Microelectronics) → Install.

Step 6: Select your board → Tools → Board → NuttyFi Framework → NuttyFi 2.0.

Step 7: Select the PortTools → Port (choose the new COM/tty) like shown in below image. 

And That’s it. Your NuttyFi board is ready to code.  Click Verify then Upload. The onboard LED should blink.

Quick Test (Blink with inbuilt LED)

Test Sketch (Blink)

// Minimal Blink for NuttyFi inbuilt Led

#ifndef LED_BUILTIN
#define LED_BUILTIN D4 // LED is on GPIO2
#endif

void setup(){
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop(){
  digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
  delay(500);
}
  

Quick Test (Fade with inbuilt LED)

LED Fade (NuttyFi IoT Board)

// NuttyFi IoT Board onboard LED (GPIO2 / D4), active-LOW
const int LED_PIN = D4;     // or use LED_BUILTIN
const int PWM_MAX = 1023;   // ESP8266 analogWrite range (0..1023)

void setup() {
  pinMode(LED_PIN, OUTPUT);
  analogWriteRange(PWM_MAX);
  analogWriteFreq(1000);    // 1 kHz (optional)
}

void loop() {
  // Fade IN (dim -> bright)
  for (int b = 0; b <= PWM_MAX; b += 5) {
    analogWrite(LED_PIN, PWM_MAX - b); // invert for active-LOW
    delay(5);
  }
  // Fade OUT (bright -> dim)
  for (int b = PWM_MAX; b >= 0; b -= 5) {
    analogWrite(LED_PIN, PWM_MAX - b); // invert for active-LOW
    delay(5);
  }
}
  

Happy Coding. 

Posted on 1 Comment

How to Install FTDI USB to UART Bridge Drivers

We have Customized boards that are Compatible with Arduino IDE that use the FT232RL. If you have one of these older versions, you’ll want to use the FDTI drivers as well. if you are using CH340 based programmer then you can buy it from here

Now that you know why the FTDI Basic is important and what products it is used for, let’s learn how to install the drivers.

Windows – Quick and Easy

Note: The tutorial is compiled with windows 7. The process should be very similar for other versions of Windows. For most late versions of windows, such as 8.1 through Windows 10, the hardware may work fine without any driver install. If you can’t locate a COM port for your hardware, then the set of instructions below is the possible fix.

Note for Educators: You will most likely need to obtain administrative privileges from your network or IT administrator in order to install these drivers.

  • By default, windows does not have FTDI drivers installed. If you plug in your FTDI, open the Arduino IDE, go to ‘Tools -> Serial Ports’, and see nothing, you need the drivers! Let’s go get them!
  • Download a copy of the v2.12.28 FTDI VCP Driver Executable here:

WINDOWS FTDI VCP DRIVER EXECUTABLE – V2.12.28 (CDM21228_SETUP.EXE)

Otherwise, visit FTDI’s VCP official Drivers page for the latest download of the Windows. if you are using CH340 ic based programmer, then download it from here at CH340 Driver’s official page.  FTDI Driver executable and clicking on the Window’s “Available as a setup executable” link. Make sure to unzip the executable before proceeding to the next step.

  • Choose ‘Run’ once it is has finished downloading, or find the file you just downloaded “CDM21228_Setup.exe” and double-click it to run it.

Note: At the time of this tutorial, the images were referencing the old “v2.12.00” FTDI VCP driver executable. The installation process will be the same regardless of the version number.

  • Choose ‘Extract’ and continue through the installation until it finishes.
  • If everything was successful, you should see some nice green check marks, indicating success!

Note: You may need administrator privileges on your machine in order for this to run properly. If things didn’t work out, try the next section of this tutorial: Windows – In Depth.

  • Open up the Arduino IDE, and go to ‘Tools -> Serial Port’. If you now have a COM port, congratulations! Again, if something went wrong, either retry this tutorial or give Windows – In Depth a try!

Windows – In Depth

Note: The screen shots in this tutorial are from Windows 7. The process should be very similar for other versions of Windows. The exception to this is Windows 8. For instructions on how to disable device driver signatures, please visit this tutorial.

Note for Educators: You will most likely need to obtain administrative privileges from your network or IT administrator in order to install these drivers.

  • Plug in your FTDI using a USB cable. Windows doesn’t have the correct drivers, so let’s find them!
  • Navigate to the FTDI website, and choose the ‘VCP’ (Virtual Com Port) option near the bottom.
  • Now choose either the 32 bit version or the 64 bit version. Not sure which you have? The next steps will go over how to find that information. If you already know which version you are running, you may skip the next two steps.
  • Open the start menu, right-click on ‘Computer,’ and left-click on ‘Properties’.
  • Look under ‘System type,’ to see which version you have.
  • Now go back to the FTDI site, right-click on the correct version, and save it to your computer. Remember where the files are saved. We’ll need them in the next step.
  • Navigate to the folder containing the files. They will be inside of a .zip file, so you’ll need to extract them. Right-Click on the .zip file, and choose ‘Extract All…’ When the next window appears, as shown above, pay attention to where it is extracting the files. Make sure that ‘Show extracted files when complete’ is checked, and click ‘Extract’.
  • When the extraction is complete, the folder is opened. Again, take note of this folder location. This is the one containing the drivers.
  • We’re almost there! Open the start menu, right-click on ‘Computer’, and left-click on ‘Manage’. You will need administrator rights to do this. If you aren’t an administrator on your computer, talk to the person who is and have them enter their credentials.
  • Left-click on ‘Device Manager’ in the leftmost column. Here is where we see the offending hardware. It has an exclamation mark next to it.
  • Right-click on ‘FT232R USB UART,’ and left-click ‘Update Driver Software…’
  • Now choose ‘Browse my computer for driver software’.
  • Left-click ‘Browse,’ and navigate to the location of the extracted files. Choose the extracted folder. There is no need to search any further in the folder. Then left-click ‘OK’.
  • Make sure ‘Include subfolders’ is checked (very important!), and left-click ‘Next’.
  • After a moment, you will see a success message! Left-click ‘Close’.
  • The Device Manager page will refresh and you will see a new item with an exclamation mark named ‘USB Serial Port’. You will need to install a second driver for the same device. Follow the steps 1-15, as before, and use the same driver folder too!
  • Once those steps are complete, you will see another success message! Left-click ‘Close’.
  • The Device Manager Page will refresh again and show ‘USB Serial Port (COMxx),’ where xx = some number. Congratulations, you now have the proper FTDI drivers and can begin to use your device!
  • Open up the Arduino IDE, and go to ‘Tools -> Serial Port’. If you now have a COM port, congratulations! Again, if something went wrong, either retry this tutorial or give Windows – In Depth a try!

Note: You should only need to go through this process once. Every subsequent FTDI device you plug in should now have these drivers associated with it. However, if this is not the case, you can follow these instructions again for other devices.

Note: If you have more than one FTDI device plugged in to your computer at the same time, all of the devices will show up in the Arduino IDE’s Serial Port menu and device manager. To figure out which device is which, look under the Arduino IDE’s ‘Serial Port’ menu. Take note of the names of each device. Then unplug the device you want to use. Go back to the ‘Serial Port’ menu. The device you unplugged should no longer be listed. That is the device you want. Plug it back in, and select the device that has now reappeared.

You can determine what COM port an FTDI device enumerated to by opening the device manager and browsing the “Ports (COM & LPT)” tree.

Posted on Leave a comment

Getting Start with NUTTYFI- An IoT Device Examples

Fundamental Requirements:

To Start with NUTTYFI, You have to NUTTYFI IOT Device & FTDI USB to UART Bridge.

After that Connect NUTTYFI to your Computer using FTDI USB to UART Bridge & got to tools -> boards-> NodeMCU 1.0(ESP-12E Module & Select the Port like COM3.

after that copy these code (codes given below) to your arduino IDE & compile & upload to NUTTYFI & all done.

Download: 

Examples- 

  • How to Blink LED using NUTTYFI?
/**************************************NUTTYFI****************************/
// connect LED Positive pin at D6 of NUTTYFI. Connect Negative pin of LED to GND at NUTTYFI.
const int led = D6;
void setup() {
pinMode(led, OUTPUT); // initialize digital pin 'led' as an output.
} 
// the loop function runs over and over again forever 
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
/*********************************************************/
/**************************************NUTTYFI****************************/
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(D2, D3, D4, D5, D6, D7);

void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Set the cursor
lcd.setCursor(0, 0);
// Print a message to the LCD.
lcd.print("Hi! Welcome");
}

void loop() {

lcd.setCursor(0, 1);
lcd.print("to NUTTYFI");
lcd.setCursor(12, 1);
lcd.print(millis() / 1000);
}
/*********************************************************/
/*********************************NUTTYFI*********************************/

#include <ESP8266WiFi.h>
String apiKey = "Z55PHKYMUB0QTTE5"; //Change your 'Write API Key' of your thingspeak channel
const char* ssid = "NUTTYFI"; // Change your hotspot/ wifi name here
const char* password = "NUTTYFI@123"; // Change your wifi/ hotspot password
const char* server = "api.thingspeak.com";
WiFiClient client;

const int temp=A0; // Connect your LM35 temperature sensor AOUT pin TO A0 Pin of NUTTYFI.
int LM35_data=0;
String inputString_NODEMCU = "";

void setup()
{
Serial.begin(9600); // Serial Begin at 9600 Baud Rate
delay(3000);
WiFi.begin(ssid, password);
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
}

void loop()
{
// as LM35 sensor gives 10mV Scale Factor to change in one Degree Centegrade,double as compare to Arduino
LM35_data=analogRead(temp)/2;
if (client.connect(server,80))
{
String postStr = apiKey;
postStr +="&field1=";
postStr += String(LM35_data);
postStr += "\r\n\r\n";

client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);

Serial.print("Field-1: ");
Serial.print(LM35_data);
Serial.println(" data send");


}
client.stop();
Serial.println("Waiting");
delay(400);// thingspeak needs minimum 15 sec delay between updates

}
/*********************************************************/
/***************************NUTTYFI***************************************/
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>

String apiKey = "Z55PHKYMUB0QTTE5"; //Change your 'Write API Key' of your thingspeak channel
const char* ssid = "NUTTYFI"; // Change your hotspot/ wifi name here
const char* password = "NUTTYFI@123"; // Change your wifi/ hotspot password
const char* server = "api.thingspeak.com";
WiFiClient client;

const int trigPin = D6;
const int echoPin = D7;
// defines variables
long duration;
int distance;

void setup()
{
Serial.begin(9600);
delay(10);
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
WiFi.begin(ssid, password);
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
}

void loop()
{
void Ultra_NUTTYFI();
if (client.connect(server,80))
{
NUTTYFI_Ultrasonic_POST();
}
client.stop();
Serial.println("Waiting");
delay(1000);// thingspeak needs minimum 15 sec delay between updates

}

void Ultra_NUTTYFI()
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);// Sets the trigPin on HIGH state for 10 micro seconds
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); // Reads the echoPin, returns the sound wave travel time in microseconds
distance= duration*0.034/2; // Calculating the distance
Serial.print("Distance: ");// Prints the distance on the Serial Monitor
Serial.println(distance);
}
void NUTTYFI_Ultrasonic_POST()
{
String postStr = apiKey;
postStr +="&field1=";
postStr += String(distance);
postStr += "\r\n\r\n";

client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(postStr.length());
client.print("\n\n");
client.print(postStr);

Serial.print("Send data to channel-1 ");
Serial.print("Content-Length: ");
Serial.print(postStr.length());
Serial.print("Field-1: ");
Serial.print(distance);
Serial.println(" data send");

}
class="brush: cpp">
/*********************************************************/