Skip to content

Instantly share code, notes, and snippets.

View MechanicalCoder's full-sized avatar

Chandan Sinha MechanicalCoder

  • Cummins Inc. || Virginia Tech || IIT Hyderabad
  • Columbus, Indiana
View GitHub Profile
Title: Hello World - 101
Date: 2016-05-07 5:30 PM
Modified: 2016-07-02 11:00 PM
Category: Github
Tags: pelican, publishing, markdown, github, settings
Summary: Setting up my techblog using [pelican](https://docs.getpelican.com/en/)
# Hi Everyone!

http://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1054&context=nasapub

2 & 3-node beam finite elements Recently proposed structural theory that accounts for stretching, bending and transverse shear deformations RZT provides significant improvements over zigzag and higher-order theories

  • analytically rigorous
  • variationally consistent
  • computationally attractive

Anomalies of previous zigzag and higher-order theories - vanishing of transverse shear stress and force at clamped boundaries

#include "application.h"
unsigned int nextTime = 0; // Next time to contact the server
const int gasOutput = A0;
// int DangerLight = D7;
float MidConcThreshold = 650;
// float HighConcThreshold =1000;

What I learnt about Particle (Its awesome!)

Particle Cloud API

So we wanted to send our sensor data over wifi to a server to be published on web through spark photon. Looking into the Internet, we came across this spark.publish() function.

First we need to understand what Particle cloud API is.

Actually any API supports three basic operations - GET, POST & PUT. Here we request the URL using device ID and access token. You can easily get the access token by clicking the 'setting' button in Particle Build editor.

After lot of efforts, I finally got this thing working. I don't know whether it was deliberately made this complex or I was missing something crucial.

Initially I had a hard time finding the way to configure the file. It is what exported from app.config.from_envvar() and I didn't know what it actually wanted. This was mentioned as the first step to run the Flaskr app on Github.

First I learnt a bit about what .cfg file is and what it does. Then I moved on with the Google query about configuring the flask app. Though I didn't find the exact solution, I found the docs on how a sample configuration file actually looks.

I just wrote a simple flaskrconfig.cfg file, saved it on desktop and pointed the flaskr configuration path to this file by SET FLASKR_SETTINGS= \path\to\flaskrconfig.cfg. Then as instructed I initialized the database. Fortunately it got started at once without any error.

One more things was to get 'flask' command working in the command line. Earlier it was not getting recognized as command o

#define trigPin 13
#define echoPin 12
#define led 11
#define led2 10
#define threshold_distance 10
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);