IOT lab QnA

Questions:
Arduino UNO





1.  Programming Language used in Arduino
2. No of Analog Pins, Applications
3. No of Digital Pins, Applications
4. No of PWM pins, Applications

5. function significance of:
void setup() 
{
}


6. function significance of:
void loop()
{
}

7. pin number of inbuilt LED 

8.
int x;
x= analogRead(A0);


9.delay (2500);
delay(1000);

10. digitalWrite(2,HIGH);

11. digitalWrite(2,HIGH); delay(1000);

12.  
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2,LOW);
delay(500);

13. digitalWrite(14,LOW); 

14.  Serial.begin(9600);

15. 
which one is correct?
serial.begin(9600);
Serial.begin(9600);

16. Does Arduino Uno contain Microprocessor or Microcontroller?

17. Basic controlling electronic chip on Arduino?

18. How much Power Supply is required for  Arduino? AC/DC?

19. LED =?

20. LED has how many terminals?  names?

21.  tone(8, 440, 100);

22. 
  pinMode(A0, INPUT);
  pinMode(8, OUTPUT);
meaning?
if 8th pin is HIGH, then voltage at this pin is?

23. purpose/application/use of pin0, pin1 other than digitalWrite;

24. Wi-Fi in-built Arduino boards models?

25. 7-segment display in detail?

26. Types of 7-segment displays?

27. How to get 8 displayed in common cathode 7-segment display?

28. How to get 8 displayed in common anode 7-segment display?

29.
LDR =full form?
Working ?

30.
IOT = full form?


31. Cloud purpose in IOT?

32. What is API ?

33. Function of API?

34. Types of API?

35. Bluetooth Frequency?

36. Range / distance of bluetooth?

37. Wi-Fi full form?

38. Types of Wi-Fi?

39. How is Bluetooth different from Wi-Fi, while still using same 2.4GHz frequency?

40. How to reset Arduino, if it is stuck at a point while running?

41. Raspberry Pi and Arduino-Uno differences?

42. Raspberry Pi types of boards?

       Ref Link and Credits: Link





43. Pi A and Pi B difference?

44. Arduino Types of Boards?

45.  Can I connect Motor to any Arduino / Raspberry-Pi directly?

46. L293 and L298 driver difference?

47. 
GPIO = ?

48.
GPIO Initializing ?


49. BCM in GPIO?

50. Which to use in RaspberryPi program?
GPIO.BCM or GPIO.BOARD? 
Difference ?








Key:
1. modified c++
2. A0 to A5; temperature is continuous data; humidity, etc.,
int value=0;
value= analogRead(A0);

3. 0 to 13; HIGH, LOW i.e., logic 1 and logic 0 respectively
int value;
value=digitalRead(8);

4.  
3, 5, 6, 9, 10, 11 are PWM pins.
These pins are highlighted with ~ symbol.
Ex: 
// here pin 5 used as digital Write
//either HIGH or LOW is written to the pin5
digitalWrite(5, HIGH); 
delay(1000);
digitalWrite(5, LOW);
// motor spins with max RPM

// here pin 5 used as analog Write
// analog values range from 0 to 1023
analogWrite(5,0);
analogWrite(5,100);
analogWrite(5,1023);
// motor spins with different RPM

5.
initiate pins as input or output

6.
the main program (required to implement a logic) that repeats itself is in the loop.

7.
pin 13


8.
x is an integer;
analog pin data is stored in variable x;

9.
delay(1000); means 1000ms = 1second delay;
delay(2500); means 2.5seconds delay;

10.
pin 2 is written logic HIGH;


11. pin2 is written logic HIGH; this instruction stays as it is for 1second.
means pin2=HIGH for 1 second;

12. pin2 output = HIGH for 1 second;
pin2 output = LOW for 1/2 second;

13. pin14 does not exist in Arduino Uno.

14. serial communication to Arduino; 9600 is baudrate;

15. Serial.begin(9600);

16. Microcontroller

17. ATMEGA 89C51

18. 5V; DC;

19. LED = Light Emitting Diode





20. 2 terminals; Anode, Cathode;

21.
pin8 must be connected to buzzer; 
play frequency 440Hz
play for 100ms i.e., 0.1second

22.
A0 is used as INPUT
pin8 is used as OUTPUT
if 8th pin=HIGH, then voltage =5V apprx (depends on Supply given to Arduino)
*The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board

Ex:
Power supplied by 6 volt battery producing 6.5v: Pin 12 output voltage 4.9v
Power supplied by 9 volt battery producing 10v : Pin 12 output voltage 5v

23. 0= Rx and 1= Tx;
serial transmission and receiving of data by Arduino

24. ESP32 and ESP8266 are both Wi-Fi inbuilt Arduino.
Arduino Uno does not have Wi-Fi.

25. 


the seven segments are A, B, C, D, E, F, G;


26.
(i) common cathode 7-segment display
(ii) common anode 7-segment display

27.
A=B=C=D=E=F= HIGH
G= LOW

28.
A=B=C=D=E=F= LOW
G= HIGH

29.
LDR = Light Dependent Resistor
Light falls on film, then resistance of LDR reduces. This depends on the intensity of light fallen on LDR...
simply No light ==> High resistance
Max light ==> least resistance


30.
Internet of Things

31.
Devices connected to each other via Internet.
This must enable smartness.... means automatic decision capability in devices....
The transactions (change of Bulb =On, bulb=off;... each one is called transaction) are stored online for future reference. .... this online storage called Cloud.... 

Ex: Thing speak is a free cloud provided by MATLab.


32. Application Programming Interface


33. a software intermediary that allows two applications to talk to each other.

34.
Public API
Also known as open API, a public API is designed specifically for consumption by a market of web-based software developers.
Partner API
The partner API function is similar to open APIs, except it is designed specifically for partner enterprises to fulfill a unique business need.
Private APIs 
These are developed exclusively for use by an organization’s own internal development teams.
Composite API
A composite API enables users to request data from multiple servers and sources and complete requests through a single API call.

35.
2.4GHz;
It is called Universal Frequency.

36. 



37. Wireless Fidelity


38. Wi-Fi is a networking technology that uses radio waves to allow high-speed data transfer over short distances. It was developed by IEEE. 
Protocol name is 802.11

Types of Wifi are:
802.11a, b, g, n bands/ technologies.

basically two standard frequency ranges. 2.4GHz and 5GHz frequencies.
Larger frequency => higher data rates (data transfer with more speed) but reduced distance of speed.

39.
Wi-Fi and Bluetooth both occupy a section of the 2.4 GHz ISM band that is 83 MHz-wide.
*Bluetooth uses Frequency Hopping Spread Spectrum (FHSS) and is allowed to hop between 79 different 1 MHz-wide channels in this band. 
*Wi-Fi uses Direct Sequence Spread Spectrum (DSSS) instead of FHSS.

40.
Click the reset button (Red button); 
This does not clear the program dumped in Arduino.
The Arduino re-runs the program in void loop {} by clearing all available variable values..... 


41. 
Arduino-Uno     Raspberry Pi
Microcontroller    Microprocessor
single tasking       Multitasking
no need of OS        RaspberryPi OS
no bluetooth           in-built bluetooth
no Wi-Fi                in-built Wi-Fi
no Ethernet            in-built Ethernet (LAN) port
no USB interfacing         can handle USB mouse, USB keyboard, etc.,
500 to 1000/-            2000 to 4000/-
modified C++          Python
limited I/O pins        Plenty of I/O pins



42. 
Pi 1 Model B (2012)
Pi 1 Model A (2013)
Pi 1 Model B+ (2014)
Pi 1 Model A+ (2014)
Pi 2 Model B (2015)
Pi Zero (2015)
Pi 3 Model B (2016)
Pi Zero W (2017)
Pi 3 Model B+ (2018)
Pi 3 Model A+ (2019)
Pi 4 Model A (2019)
Pi 4 Model B (2020)
Pi 400 (2021)

43. Raspberry Pi- A => less expensive variant, and tends to have reduced RAM and fewer ports (such as USB and Ethernet)

which indirectly means Raspberry=Pi B variants are costlier and have more ports.

44. 
Arduino Uno R3. ...
Arduino Nano. ...
Arduino Micro. ...
Arduino Leonardo. ...
Arduino Micro. ...
Arduino Mega2560 Rev3. ...
Arduino Nano 33 BLE. ...
Arduino Due



45. 
No. 
* Connect LED via resistor to Arduino/ Raspberry-Pi.
* Motor to Arduino: Motor  --->L293D motor driver IC  ---> Arduino
* Motor to RaspberryPi: Motor  ---> L293D   ----> Raspberry-Pi (5V pins)

46.
L293D is a quadruple motor driver that employs a half-H driver, whereas L298N is a dual full-H driver, which means that in L293D all four input-output lines are independent, whereas in L298N a half-H driver cannot be utilized separately, and only a full H driver may be used.

Half-bridge drivers combine one low- and one high-side driver, so they can drive Q1 and Q2 (or Q3 and Q4) together. Full-bridge drivers obviously have two low-side and two high-side drivers so they can drive all four FETs.


47. General Purpose Input and Output Pins

48. GPIO initializing 
GPIO.setmode(GPIO.BCM) : Using pins BCM numbers.
GPIO.setup(# of pin, GPIO.IN) : Determine the pin as input.
GPIO.setup(# of pin, GPIO.OUT) : Determine the pin as an output.
GPIO.setup(# of pin, GPIO.OUT, initial=GPIO.HIGH) : Initialization output.
GPIO.input(# of pin) : Reading input pin.

49.
Broadcom

50. 
The GPIO.BOARD option specifies that you are referring to the pins by the number of the pin on the plug - i.e the numbers printed on the board (e.g. P1) and in the middle of the diagrams below.

The GPIO.BCM option means that you are referring to the pins by the "Broadcom SOC channel" number, these are the numbers after "GPIO" in the green rectangles around the outside of the below diagrams






References:

* Raspberry-Pi   -- Link1      Link2     Link3    Link4

* Arduino --- Link1     Link2     Link3     Link4     Link5

* Wi-Fi and Bluetooth, Frequency Ranges --- Link1    Link2

* Motor Drivers    Link1    Link2     Link3