1562184696
In this article, I am going to show you how to send sensor sensor data to a local webserver using esp8266.
Before delving into this article , let me explain the term localhost.
Localhost refers to the local computer that a program is running on. For example, if you are running a Web browser on your computer, your computer is considered to be the “localhost”.
The deliverables for this project are:
Xamp webserver download it here https://www.apachefriends.org/
Arduino IDE download here https://www.arduino.cc/
ESP8266 official website https://www.nodemcu.com/
Smartphone used as a router.
Project requirement: Create a folder in the xamp/htdocs named esp8266. In this folder you are going to save the postData.php and databaseConfig.php
To send the sensor data to a database, we need to write an arduino sketch using a TCP protocol to communicate wirelessly to the local webserver.
Let’s get it done now!
Step 1: Install esp8266 board the link to the procedure can be found here https://randomnerdtutorials.com/how-to-install-esp8266-board-arduino-ide/
Step 2: The arduino sketch is shown below. I create two function connectWifi() and sendSensorData() which I invoke respectively in the void setup and void loop. If you are confused please look for a tutorial on basic arduino code.
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPClient.h>
const char *ssid = "MelleB"; //ENTER YOUR WIFI ssid
const char *password = "refj4497"; //ENTER YOUR WIFI password
void setup() {
connectWifi();
}
void loop() {
SendSensorData();
}
//function to connect to wifi
void connectWifi(){
delay(1000);
Serial.begin(115200);
WiFi.mode(WIFI_OFF); //Prevents reconnection issue (taking too long to connect)
delay(1000);
WiFi.mode(WIFI_STA); //This line hides the viewing of ESP as wifi hotspot
WiFi.begin(ssid, password); //Connect to your WiFi router
Serial.println("");
Serial.print("Connecting");
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
//If connection successful show IP address in serial monitor
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP()); //IP address assigned to your ESP
}
//function to send sensor data
void SendSensorData() {
HTTPClient http; //Declare object of class HTTPClient
String sensorData1,sensorData2,sensorData3,sensorData4,sensorData5,sensorData6,sensorData7, postData;
sensorData1="High";
sensorData2="High";
sensorData3="High";
sensorData4="High";
sensorData5="High";
sensorData6="High";
sensorData7="High";
//Post Data
postData = "sensor1=" + sensorData1 + "&sensor2=" + sensorData2+ "&sensor3=" + sensorData3+ "&sensor4=" + sensorData4+ "&sensor5=" + sensorData5+ "&sensor6=" + sensorData6+ "&sensor7=" + sensorData7;
http.begin("http://192.168.43.142/esp8266/postData.php"); //change the ip to your computer ip address
http.addHeader("Content-Type", "application/x-www-form-urlencoded"); //Specify content-type header
int httpCode = http.POST(postData); //Send the request
String payload = http.getString(); //Get the response payload
Serial.println(httpCode); //Print HTTP return code
Serial.println(payload); //Print request response payload
http.end(); //Close connection
delay(5000); //Post Data at every 5 seconds
}
Step 3: Create the database sensor and the table name logs and save it in the esp866 folder as databaseConfig.php
//connect to localhost if not exists
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create database
$sql = "CREATE DATABASE sensor";
echo "Database created successfully";
} else {
echo "Error creating database: " . $conn->error;
}
$conn->close();
echo "<br>";
//Connect to database and create table
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "sensor";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "CREATE TABLE logs (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
sensor1 VARCHAR(30),
sensor2 VARCHAR(30),
sensor3 VARCHAR(30),
sensor4 VARCHAR(50),
sensor5 VARCHAR(50),
sensor6 VARCHAR(50),
sensor7 VARCHAR(50),
\`Date\` DATE NULL,
\`Time\` TIME NULL,
\`TimeStamp\` TIMESTAMP NULL DEFAULT CURRENT\_TIMESTAMP ON UPDATE CURRENT\_TIMESTAMP)";
if ($conn->query($sql) === TRUE) {
echo "Table logs created successfully";
} else {
echo "Error creating table: " . $conn->error;
}
$conn->close();
?>
Step 4: Create postData.php in the esp866 folder and paste the code below in it.
//Creates new record as per request
//Connect to database
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "sensor";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Database Connection failed: " . $conn->connect_error);
}
//Get current date and time
date\_default\_timezone_set('Asia/Kolkata');
$d = date("Y-m-d");
//echo " Date:".$d."<BR>";
$t = date("H:i:s");
if(!empty($\_POST\['sensor1'\]) || !empty($\_POST\['sensor2'\]))
{
$sensorData1 = $_POST\['sensor1'\];
$sensorData2 = $_POST\['sensor2'\];
$sensorData3 = $_POST\['sensor3'\];
$sensorData4 = $_POST\['sensor4'\];
$sensorData5 = $_POST\['sensor5'\];
$sensorData6 = $_POST\['sensor6'\];
$sensorData7 = $_POST\['sensor7'\];
$sql = "INSERT INTO logs (sensor1, sensor2,sensor3,sensor4,sensor5,sensor6,sensor7, Date, Time) VALUES ('".$sensorData1."', '".$sensorData2."', '".$sensorData3."', '".$sensorData4."', '".$sensorData5."', '".$sensorData6."', '".$sensorData7."', '".$d."', '".$t."')";
if ($conn->query($sql) === TRUE) {
echo "OK";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
$conn->close();
?>
Step 5: software testing
Please let me know in case of any errors.
#arduino #php #apache #database #mysql
1562956430
What I was looking for 😅.
Thank you professor .
1583718461
Tank you for sharing this project. I reproduced it and flased my ESP12 successfully. When I searched for localhost/esp8266, it came back with this message:
*Unable to connect
Firefox can’t establish a connection to the server at localhost.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
I think, I am missing something. In your printout, I see "OK" and "200". Is this number the sum of the 7 sensors? I do not see sensors connected to the nodemcu picture in your article. Please, clarify. Thank you, Maci
1584545022
a,s,as
1584545057
I test and in my case give me a -1. What I do?
1588342840
@Maci Nissa, if firefox cannot open localhost that means your apache server is not running.
1588343089
@Roberto Nogueira, if you get -1 it means a bad request check this section of the code http.begin(“http://192.168.43.142/esp8266/postData.php”); hostIPAdress/projectFolder/phpFile in this order
1588975954
Hello,
Could you share your PHP codes, then i can download them?
because i got error when i wrote the above codes.
thanks
1590017201
@ Mohammed Morhaf Jaela, what error did you get?
Did you change the ip address to your computer ip and did you name your xamp folder esp8266 in http.begin(“http://192.168.43.142/esp8266/postData.php”) ? Sorry for the late reply.
1591345097
In the serial monitor i see -1, http.begin(“http://myip/esp8266/postData.php”);
it’s right.
how can i solve it?
1600860557
Hello Maximilien,
Thanks for the wonderful project, I nearly got through your instructions but for some reason am unable to successfully config the php files, I get the below error while trying to open them trhough localhost/esp8266. Please help.
"; //Connect to database and create table $servername = "localhost"; $username = "root"; $password = ""; $dbname = "sensor"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "CREATE TABLE logs ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, sensor1 VARCHAR(30), sensor2 VARCHAR(30), sensor3 VARCHAR(30), sensor4 VARCHAR(50), sensor5 VARCHAR(50), sensor6 VARCHAR(50), sensor7 VARCHAR(50), \`Date\` DATE NULL, \`Time\` TIME NULL, \`TimeStamp\` TIMESTAMP NULL DEFAULT CURRENT\_TIMESTAMP ON UPDATE CURRENT\_TIMESTAMP)"; if ($conn->query($sql) === TRUE) { echo "Table logs created successfully"; } else { echo "Error creating table: " . $conn->error; } $conn->close(); ?>```
1600866730
Hello Maximilien,
I get below parse errors now, I have my Apache & MySQL servers running on XAMPP
Parse error: syntax error, unexpected '}', expecting end of file in C:\xampp\htdocs\esp8266\databaseConfig.php on line 21
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting variable (T_VARIABLE) or '{' or '$' in C:\xampp\htdocs\esp8266\postData.php on line 26
Serial Monitor for ESP8266 outputs below.
<br />
<b>Parse error</b>: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting variable (T_VARIABLE) or '{' or '$' in <b>C:\xampp\htdocs\esp8266\postData.php</b> on line <b>26</b><br />```
please help with this exception.
1637849791
i have an error
exit status 1
call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
how can i solve this error ?
1672156915
Can the same project be done using ESP 8266 ESP01 module ??
1596789120
Everything around us has become smart, like smart infrastructures, smart cities, autonomous vehicles, to name a few. The innovation of smart devices makes it possible to achieve these heights in science and technology. But, data is vulnerable, there is a risk of attack by cybercriminals. To get started, let’s know about IoT devices.
The Internet Of Things(IoT) is a system that interrelates computer devices like sensors, software, and actuators, digital machines, etc. They are linked together with particular objects that work through the internet and transfer data over devices without humans interference.
Famous examples are Amazon Alexa, Apple SIRI, Interconnected baby monitors, video doorbells, and smart thermostats.
When technologies grow and evolve, risks are also on the high stakes. Ransomware attacks are on the continuous increase; securing data has become the top priority.
When you think your smart home won’t fudge a thing against cybercriminals, you should also know that they are vulnerable. When cybercriminals access our smart voice speakers like Amazon Alexa or Apple Siri, it becomes easy for them to steal your data.
Cybersecurity report 2020 says popular hacking forums expose 770 million email addresses and 21 million unique passwords, 620 million accounts have been compromised from 16 hacked websites.
The attacks are likely to increase every year. To help you secure your data of IoT devices, here are some best tips you can implement.
Your router has the default name of make and model. When we stick with the manufacturer name, attackers can quickly identify our make and model. So give the router name different from your addresses, without giving away personal information.
If your devices are connected to the internet, these connections are vulnerable to cyber attacks when your devices don’t have the proper security. Almost every web interface is equipped with multiple devices, so it’s hard to track the device. But, it’s crucial to stay aware of them.
When we use the default usernames and passwords, it is attackable. Because the cybercriminals possibly know the default passwords come with IoT devices. So use strong passwords to access our IoT devices.
Use strong or unique passwords that are easily assumed, such as ‘123456’ or ‘password1234’ to protect your accounts. Give strong and complex passwords formed by combinations of alphabets, numeric, and not easily bypassed symbols.
Also, change passwords for multiple accounts and change them regularly to avoid attacks. We can also set several attempts to wrong passwords to set locking the account to safeguard from the hackers.
Are you try to keep an eye on your IoT devices through your mobile devices in different locations. I recommend you not to use the public WI-FI network to access them. Because they are easily accessible through for everyone, you are still in a hurry to access, use VPN that gives them protection against cyber-attacks, giving them privacy and security features, for example, using Express VPN.
There are software and firewalls like intrusion detection system/intrusion prevention system in the market. This will be useful to screen and analyze the wire traffic of a network. You can identify the security weakness by the firewall scanners within the network structure. Use these firewalls to get rid of unwanted security issues and vulnerabilities.
Every smart device comes with the insecure default settings, and sometimes we are not able to change these default settings configurations. These conditions need to be assessed and need to reconfigure the default settings.
Nowadays, every smart app offers authentication to secure the accounts. There are many types of authentication methods like single-factor authentication, two-step authentication, and multi-factor authentication. Use any one of these to send a one time password (OTP) to verify the user who logs in the smart device to keep our accounts from falling into the wrong hands.
Every smart device manufacturer releases updates to fix bugs in their software. These security patches help us to improve our protection of the device. Also, update the software on the smartphone, which we are used to monitoring the IoT devices to avoid vulnerabilities.
When we connect the smart home to the smartphone and control them via smartphone, you need to keep them safe. If you miss the phone almost, every personal information is at risk to the cybercriminals. But sometimes it happens by accident, makes sure that you can clear all the data remotely.
However, securing smart devices is essential in the world of data. There are still cybercriminals bypassing the securities. So make sure to do the safety measures to avoid our accounts falling out into the wrong hands. I hope these steps will help you all to secure your IoT devices.
If you have any, feel free to share them in the comments! I’d love to know them.
Are you looking for more? Subscribe to weekly newsletters that can help your stay updated IoT application developments.
#iot #enterprise iot security #how iot can be used to enhance security #how to improve iot security #how to protect iot devices from hackers #how to secure iot devices #iot security #iot security devices #iot security offerings #iot security technologies iot security plus #iot vulnerable devices #risk based iot security program
1618218679
Hire IoT app developers who can help you build smart solutions that connect smartphones with remote devices. Our dedicated IoT app development teams are rated among the top 1% experts in India and have gained excellence in delivering IoT app projects and service for all business sizes and industry verticals at up to 60% less cost.
You may choose to hire offshore IoT app programmers with 4+ years of experience average experience across a variety of hiring models including monthly(dedicated), hourly and full-time.
Planning to outsource services to build mobile apps using IoT technology? Or would you like to hire IoT app developers? Get in touch for a free consultation!
Visit Website - https://www.valuecoders.com/iot-development-company
#iot developer #iot developers #iot development companies #iot development company #iot software development company #iot app developer
1667425440
Perl script converts PDF files to Gerber format
Pdf2Gerb generates Gerber 274X photoplotting and Excellon drill files from PDFs of a PCB. Up to three PDFs are used: the top copper layer, the bottom copper layer (for 2-sided PCBs), and an optional silk screen layer. The PDFs can be created directly from any PDF drawing software, or a PDF print driver can be used to capture the Print output if the drawing software does not directly support output to PDF.
The general workflow is as follows:
Please note that Pdf2Gerb does NOT perform DRC (Design Rule Checks), as these will vary according to individual PCB manufacturer conventions and capabilities. Also note that Pdf2Gerb is not perfect, so the output files must always be checked before submitting them. As of version 1.6, Pdf2Gerb supports most PCB elements, such as round and square pads, round holes, traces, SMD pads, ground planes, no-fill areas, and panelization. However, because it interprets the graphical output of a Print function, there are limitations in what it can recognize (or there may be bugs).
See docs/Pdf2Gerb.pdf for install/setup, config, usage, and other info.
#Pdf2Gerb config settings:
#Put this file in same folder/directory as pdf2gerb.pl itself (global settings),
#or copy to another folder/directory with PDFs if you want PCB-specific settings.
#There is only one user of this file, so we don't need a custom package or namespace.
#NOTE: all constants defined in here will be added to main namespace.
#package pdf2gerb_cfg;
use strict; #trap undef vars (easier debug)
use warnings; #other useful info (easier debug)
##############################################################################################
#configurable settings:
#change values here instead of in main pfg2gerb.pl file
use constant WANT_COLORS => ($^O !~ m/Win/); #ANSI colors no worky on Windows? this must be set < first DebugPrint() call
#just a little warning; set realistic expectations:
#DebugPrint("${\(CYAN)}Pdf2Gerb.pl ${\(VERSION)}, $^O O/S\n${\(YELLOW)}${\(BOLD)}${\(ITALIC)}This is EXPERIMENTAL software. \nGerber files MAY CONTAIN ERRORS. Please CHECK them before fabrication!${\(RESET)}", 0); #if WANT_DEBUG
use constant METRIC => FALSE; #set to TRUE for metric units (only affect final numbers in output files, not internal arithmetic)
use constant APERTURE_LIMIT => 0; #34; #max #apertures to use; generate warnings if too many apertures are used (0 to not check)
use constant DRILL_FMT => '2.4'; #'2.3'; #'2.4' is the default for PCB fab; change to '2.3' for CNC
use constant WANT_DEBUG => 0; #10; #level of debug wanted; higher == more, lower == less, 0 == none
use constant GERBER_DEBUG => 0; #level of debug to include in Gerber file; DON'T USE FOR FABRICATION
use constant WANT_STREAMS => FALSE; #TRUE; #save decompressed streams to files (for debug)
use constant WANT_ALLINPUT => FALSE; #TRUE; #save entire input stream (for debug ONLY)
#DebugPrint(sprintf("${\(CYAN)}DEBUG: stdout %d, gerber %d, want streams? %d, all input? %d, O/S: $^O, Perl: $]${\(RESET)}\n", WANT_DEBUG, GERBER_DEBUG, WANT_STREAMS, WANT_ALLINPUT), 1);
#DebugPrint(sprintf("max int = %d, min int = %d\n", MAXINT, MININT), 1);
#define standard trace and pad sizes to reduce scaling or PDF rendering errors:
#This avoids weird aperture settings and replaces them with more standardized values.
#(I'm not sure how photoplotters handle strange sizes).
#Fewer choices here gives more accurate mapping in the final Gerber files.
#units are in inches
use constant TOOL_SIZES => #add more as desired
(
#round or square pads (> 0) and drills (< 0):
.010, -.001, #tiny pads for SMD; dummy drill size (too small for practical use, but needed so StandardTool will use this entry)
.031, -.014, #used for vias
.041, -.020, #smallest non-filled plated hole
.051, -.025,
.056, -.029, #useful for IC pins
.070, -.033,
.075, -.040, #heavier leads
# .090, -.043, #NOTE: 600 dpi is not high enough resolution to reliably distinguish between .043" and .046", so choose 1 of the 2 here
.100, -.046,
.115, -.052,
.130, -.061,
.140, -.067,
.150, -.079,
.175, -.088,
.190, -.093,
.200, -.100,
.220, -.110,
.160, -.125, #useful for mounting holes
#some additional pad sizes without holes (repeat a previous hole size if you just want the pad size):
.090, -.040, #want a .090 pad option, but use dummy hole size
.065, -.040, #.065 x .065 rect pad
.035, -.040, #.035 x .065 rect pad
#traces:
.001, #too thin for real traces; use only for board outlines
.006, #minimum real trace width; mainly used for text
.008, #mainly used for mid-sized text, not traces
.010, #minimum recommended trace width for low-current signals
.012,
.015, #moderate low-voltage current
.020, #heavier trace for power, ground (even if a lighter one is adequate)
.025,
.030, #heavy-current traces; be careful with these ones!
.040,
.050,
.060,
.080,
.100,
.120,
);
#Areas larger than the values below will be filled with parallel lines:
#This cuts down on the number of aperture sizes used.
#Set to 0 to always use an aperture or drill, regardless of size.
use constant { MAX_APERTURE => max((TOOL_SIZES)) + .004, MAX_DRILL => -min((TOOL_SIZES)) + .004 }; #max aperture and drill sizes (plus a little tolerance)
#DebugPrint(sprintf("using %d standard tool sizes: %s, max aper %.3f, max drill %.3f\n", scalar((TOOL_SIZES)), join(", ", (TOOL_SIZES)), MAX_APERTURE, MAX_DRILL), 1);
#NOTE: Compare the PDF to the original CAD file to check the accuracy of the PDF rendering and parsing!
#for example, the CAD software I used generated the following circles for holes:
#CAD hole size: parsed PDF diameter: error:
# .014 .016 +.002
# .020 .02267 +.00267
# .025 .026 +.001
# .029 .03167 +.00267
# .033 .036 +.003
# .040 .04267 +.00267
#This was usually ~ .002" - .003" too big compared to the hole as displayed in the CAD software.
#To compensate for PDF rendering errors (either during CAD Print function or PDF parsing logic), adjust the values below as needed.
#units are pixels; for example, a value of 2.4 at 600 dpi = .0004 inch, 2 at 600 dpi = .0033"
use constant
{
HOLE_ADJUST => -0.004 * 600, #-2.6, #holes seemed to be slightly oversized (by .002" - .004"), so shrink them a little
RNDPAD_ADJUST => -0.003 * 600, #-2, #-2.4, #round pads seemed to be slightly oversized, so shrink them a little
SQRPAD_ADJUST => +0.001 * 600, #+.5, #square pads are sometimes too small by .00067, so bump them up a little
RECTPAD_ADJUST => 0, #(pixels) rectangular pads seem to be okay? (not tested much)
TRACE_ADJUST => 0, #(pixels) traces seemed to be okay?
REDUCE_TOLERANCE => .001, #(inches) allow this much variation when reducing circles and rects
};
#Also, my CAD's Print function or the PDF print driver I used was a little off for circles, so define some additional adjustment values here:
#Values are added to X/Y coordinates; units are pixels; for example, a value of 1 at 600 dpi would be ~= .002 inch
use constant
{
CIRCLE_ADJUST_MINX => 0,
CIRCLE_ADJUST_MINY => -0.001 * 600, #-1, #circles were a little too high, so nudge them a little lower
CIRCLE_ADJUST_MAXX => +0.001 * 600, #+1, #circles were a little too far to the left, so nudge them a little to the right
CIRCLE_ADJUST_MAXY => 0,
SUBST_CIRCLE_CLIPRECT => FALSE, #generate circle and substitute for clip rects (to compensate for the way some CAD software draws circles)
WANT_CLIPRECT => TRUE, #FALSE, #AI doesn't need clip rect at all? should be on normally?
RECT_COMPLETION => FALSE, #TRUE, #fill in 4th side of rect when 3 sides found
};
#allow .012 clearance around pads for solder mask:
#This value effectively adjusts pad sizes in the TOOL_SIZES list above (only for solder mask layers).
use constant SOLDER_MARGIN => +.012; #units are inches
#line join/cap styles:
use constant
{
CAP_NONE => 0, #butt (none); line is exact length
CAP_ROUND => 1, #round cap/join; line overhangs by a semi-circle at either end
CAP_SQUARE => 2, #square cap/join; line overhangs by a half square on either end
CAP_OVERRIDE => FALSE, #cap style overrides drawing logic
};
#number of elements in each shape type:
use constant
{
RECT_SHAPELEN => 6, #x0, y0, x1, y1, count, "rect" (start, end corners)
LINE_SHAPELEN => 6, #x0, y0, x1, y1, count, "line" (line seg)
CURVE_SHAPELEN => 10, #xstart, ystart, x0, y0, x1, y1, xend, yend, count, "curve" (bezier 2 points)
CIRCLE_SHAPELEN => 5, #x, y, 5, count, "circle" (center + radius)
};
#const my %SHAPELEN =
#Readonly my %SHAPELEN =>
our %SHAPELEN =
(
rect => RECT_SHAPELEN,
line => LINE_SHAPELEN,
curve => CURVE_SHAPELEN,
circle => CIRCLE_SHAPELEN,
);
#panelization:
#This will repeat the entire body the number of times indicated along the X or Y axes (files grow accordingly).
#Display elements that overhang PCB boundary can be squashed or left as-is (typically text or other silk screen markings).
#Set "overhangs" TRUE to allow overhangs, FALSE to truncate them.
#xpad and ypad allow margins to be added around outer edge of panelized PCB.
use constant PANELIZE => {'x' => 1, 'y' => 1, 'xpad' => 0, 'ypad' => 0, 'overhangs' => TRUE}; #number of times to repeat in X and Y directions
# Set this to 1 if you need TurboCAD support.
#$turboCAD = FALSE; #is this still needed as an option?
#CIRCAD pad generation uses an appropriate aperture, then moves it (stroke) "a little" - we use this to find pads and distinguish them from PCB holes.
use constant PAD_STROKE => 0.3; #0.0005 * 600; #units are pixels
#convert very short traces to pads or holes:
use constant TRACE_MINLEN => .001; #units are inches
#use constant ALWAYS_XY => TRUE; #FALSE; #force XY even if X or Y doesn't change; NOTE: needs to be TRUE for all pads to show in FlatCAM and ViewPlot
use constant REMOVE_POLARITY => FALSE; #TRUE; #set to remove subtractive (negative) polarity; NOTE: must be FALSE for ground planes
#PDF uses "points", each point = 1/72 inch
#combined with a PDF scale factor of .12, this gives 600 dpi resolution (1/72 * .12 = 600 dpi)
use constant INCHES_PER_POINT => 1/72; #0.0138888889; #multiply point-size by this to get inches
# The precision used when computing a bezier curve. Higher numbers are more precise but slower (and generate larger files).
#$bezierPrecision = 100;
use constant BEZIER_PRECISION => 36; #100; #use const; reduced for faster rendering (mainly used for silk screen and thermal pads)
# Ground planes and silk screen or larger copper rectangles or circles are filled line-by-line using this resolution.
use constant FILL_WIDTH => .01; #fill at most 0.01 inch at a time
# The max number of characters to read into memory
use constant MAX_BYTES => 10 * M; #bumped up to 10 MB, use const
use constant DUP_DRILL1 => TRUE; #FALSE; #kludge: ViewPlot doesn't load drill files that are too small so duplicate first tool
my $runtime = time(); #Time::HiRes::gettimeofday(); #measure my execution time
print STDERR "Loaded config settings from '${\(__FILE__)}'.\n";
1; #last value must be truthful to indicate successful load
#############################################################################################
#junk/experiment:
#use Package::Constants;
#use Exporter qw(import); #https://perldoc.perl.org/Exporter.html
#my $caller = "pdf2gerb::";
#sub cfg
#{
# my $proto = shift;
# my $class = ref($proto) || $proto;
# my $settings =
# {
# $WANT_DEBUG => 990, #10; #level of debug wanted; higher == more, lower == less, 0 == none
# };
# bless($settings, $class);
# return $settings;
#}
#use constant HELLO => "hi there2"; #"main::HELLO" => "hi there";
#use constant GOODBYE => 14; #"main::GOODBYE" => 12;
#print STDERR "read cfg file\n";
#our @EXPORT_OK = Package::Constants->list(__PACKAGE__); #https://www.perlmonks.org/?node_id=1072691; NOTE: "_OK" skips short/common names
#print STDERR scalar(@EXPORT_OK) . " consts exported:\n";
#foreach(@EXPORT_OK) { print STDERR "$_\n"; }
#my $val = main::thing("xyz");
#print STDERR "caller gave me $val\n";
#foreach my $arg (@ARGV) { print STDERR "arg $arg\n"; }
Author: swannman
Source Code: https://github.com/swannman/pdf2gerb
License: GPL-3.0 license
1625139968
Whenever you hear about businesses investing in IoT, does it occur to you too why IoT has gained so much popularity?
IoT is indeed the talk of the town in today's digital world due to cost-effectiveness, excellent efficiency, better use of resources, and many more advantages.
In fact, going by the stats, the IoT technology solution has moved from the pilot stage. It is playing a vital role in digital transformation while driving business value. The continued growth of this industry will prove to be a digitizing force in all businesses.
I know these stats show remarkable growth of IoT, and you must be curious how IoT accelerates businesses.
Let me show you how IoT is transforming businesses or why it is advisable to use IoT to accelerate your business?
Here are 7 ways how the Internet of Things is transforming businesses:
IoT technology has come with several ways to reduce business expenses. The companies can further invest this revenue in developing the core values of the organization. This sets a perfect example of sustainable growth.
Here are some effective methods how IoT can help in cost-cutting:
The biggest challenge for manufacturing businesses is manual inventory management and tracking. This is because poor inventory management can lead to issues like order delays and wasted stock.
All these issues harm brand image directly. Fortunately, businesses now have the feasibility of opting IoT based inventory management. This is possible by either simply buying a ready-made IoT warehouse management software or hiring a software development company for a customized one.
IoT-based predictive maintenance technology is helpful in reducing costs for an enterprise. This intelligent technology sends you alerts about potential technical failures beforehand. This automatically lowers maintenance costs, thus saving you any loss in productivity.
Ever been into a fight over thermostat temperature in your office? Well, how about installing a smart thermostat?
Installing a smart thermostat in your organization's building is simple and one of the most effective ways to reduce cost and energy.
Offices that switched to smart thermostats saw efficient energy usage, thus lowering their company's carbon footprints.
Almost every business needs data collection and transmission assistance to work with, and the adoption of IoT has revolutionized data processing completely.
You may wonder how this will help businesses? By allowing greater access to user data, IoT apps are smart enough to track the patterns in which a user connects with the device.
With this self-learning from usage patterns, these IoT apps get more intelligent, offering a better user experience. Simultaneously, IoT products help organizations decrypt that data for business growth.
You can use that data to study consumer requirements, plan your release cycles, work on the scope of improvements, develop new inventions, and plan better ad campaigns for marketing.
For instance, wearable devices such as Fitbits or the smartwatches that we wear can communicate data through IoT-based sensors and offer accurate information about health and fitness goals.
Since IoT devices make better use of data and analytics, the company provides enhanced user experiences. This is one of the top ways how IoT is helping businesses.
Better insights allow businesses to provide a more personalized experience to every customer.
As business owners, we will also agree that consumer demands have evolved over the years. Shoppers now expect to experience a convenient online purchase without having to visit the physical store.
You can incorporate IoT in your online store to facilitate a better and enhanced user experience.
Since IoT helps businesses in ingesting, processing, visualizing, and responding to large volumes of data, organizations can ultimately come up with innovative strategies to meet customer needs.
By investing in internet-connected devices, businesses get a 360-degree view of their customer's preferences. This way, they create revenue-generating campaigns and focus better on their target audience.
In addition to this, the Internet of Things accelerates the segmentation of the customer base. This helps in generating personalized offers, thus resulting in an increased consumer satisfaction rate.
For example, Big Ass Fans have come up with innovative smart fans with light and temperature sensors. These fans outstand other ceiling fans in the market by adapting to the speed based on the user's comfort preference.
IoT technology is being highly used to boost the security of commercial buildings in multiple ways. For instance, wireless IoT-based CCTV systems can be installed anywhere on your company premises. This will provide a 24*7 live feed directly to your smart viewing device.
Development stats show that security cameras are up to 85% effective against criminals.
Another smart way to make your company office more secure is wireless alarms. It is affordable and can boost your business' security up to 7 times.
An additional benefit of installing the above-mentioned wireless smart security devices is that it has helped many businesses in lowering the cost of their liability insurances.
It is a good practice for all businesses to install smart security devices and monitor their business premises.
Real-time data collected from processes, and intelligent devices, through IoT-based sensors revolutionizes how companies do business. Ever since the possibility of real-time insights being made possible, the game has changed.
We can already witness innovation in core sectors, especially in the retail industry.
By receiving real-time data of buyers, retailers can manage the inventory or release product batches on the shelves accordingly. This will result in increased profits with efficient sales and top-notch inventory management.
The Internet of Things plays a significant role in interconnecting devices. These devices include smart cameras and other systems to work collaboratively and provide real-time data.
Working in this method, any organization can make intelligent decisions, ultimately acquiring business model innovations that help achieve further business goals.
If we take the example of real-time data-driven business, livestock monitoring deals with animal husbandry. With their IoT-based intelligent mobile applications, farmers can collect data on the welfare of their livestock. Knowing about an animal's health in time can help remove and prevent the spread of disease, which may result in a large number of sick cattle.
Above all, the biggest problem for businesses is that clients always demand fast deliveries. Nowadays, most logistics service providers and vendors have started applying IoT technology solutions to meet the quicker delivery crisis and reach the ultimate goal of customer satisfaction.
The trouble doesn't end here in processing, just with great speed. Businesses also need high-level efficiency and better productivity to be able to deliver faster.
Are you wondering how you can do that?
Well, with improved information and deep insights about markets and consumer demands, you can quickly increase the productivity of your business and meet the demand.
Also, with features like real-time feedback on operational efficiency, IoT helps in increasing the efficiency of businesses.
These innovations will help companies run at a lower cost and also help in consequently expanding the landscape intensively. This is because IoT insertion is inexpensive, and manufacturing becomes 10 times more feasible.
From eCommerce to agriculture, IoT has touched every industry. The growth of every significant business is now being supported by the Internet of Things and its innovations.
If you are also willing to invest in an IoT solution for your business, here's what you can do. The most brilliant move would be to get in touch with the top IoT app development company in India.
You won't deny, only an expert can come up with an expert solution. If you have any other queries or suggestions, feel free to comment below.
Till then, that's all, folks!
#iot development companies #iot development companies in india #iot app development company #iot development company #iot app development #iot app development companies
1619429258
As a prominent IoT solutions and services provider, Hire dedicated IoT app developers at AppClues Infotech for enhancing your business proficiency using hi-end IoT app development.
For more info:
Website: https://www.appcluesinfotech.com/
Email: info@appcluesinfotech.com
Call: +1-978-309-9910
#iot mobile app development #iot mobile app development #iot mobile app development #hire best iot app developers in usa #top iot app development company in usa #best iot app development services provider in usa