Building an Arduino Pest Repeller on Linux (Part 2) | Linux Today

Building an Arduino Pest Repeller on Linux (Part 2)

Written By
CS
Carla Schroder
May 2, 2014

An Arduino sketch contains two required functions: setup() and loop(). setup() contains code that you want to run once at the beginning of your sketch, such as pin modes and initializing hardware. In our ez1_measure.ino sketch we set our data transmission speed in setup(). We are setting a serial port speed even though our Arduino is connected with a USB cable because it is still a serial port, a proper UART (Universal Asynchronous Receiver/Transmitter), and it supports the standard serial port speeds: 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200 baud. And that is why the Arduino IDE has a serial monitor where we can watch the output of our sketches.

CS

Carla Schroder

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.