Tuesday, February 7, 2023

Selling service Online

 I recently started a new website called www.vishweshgm.com. Here I want to host few free software. Meanwhile I wanted the website to look like a purchase store with items worth 0$. So I started exploring. Here I enlist the knowledge I gained, again for free to you readers.


In order to let people buy an x$ product through website, I knew I need a payment gateway. Since I made this website through wordpress, Stripe was by default supported in wordpress. I searched online for reviews and nothing bad came about stripe. So I decided to go with it.


To set-up an account, stripe needs a lot of information. I had chosen option of "individual" in stripe company type. So this must be fairly simple and you don't need a CA to handle this account. As I started filling out form, few things that were new to me became mandatory to fill.


Support Page: This is the page that tells where your company/ address is. And also contact number needs to be mentioned.

Privacy Policy : I live in india, we don't care much about this. However the website is global, even if I am taking just a single email ID from my buyers I am expected to have a data protection and privacy policy listed in my website. So I started to look for people who can help me with this.

There is a website - https://privacyterms.io. This website allows you to generate both privacy policy and terms and conditions for your website. you just need to follow instructions thown by this website.

Cancellation and Refund Policy:  There is a website called https://app.termsfeed.com/ This will easily generate the refund policies.

And done. I am all set to receive payments through stripe.


Sunday, October 30, 2022

Reducing I2C Bus Noise

 Hello,

 In my experience I2C is very reliable protocol which you can use to communicate between one or multiple devices. However sometimes due to external circuits there can be noise on the line which makes communication not reliable. In order to reduce noise, I have compiled some of the methods here:

 Some basic rules of I2C Bus Line:

1.  I2C bus cannot have more than 400 pF (include all devices on the bus!)

 

Some Interesting facts regading Electrical Engineering design

  1.  X- Capacitors are put between Mains and Y capacitors are grounded from Live.

Friday, August 12, 2022

Use of Macros

I am listing some unique macros:

1. Following macros used for incrementing/decrementing any numer(integer preferred) x. This usually can be used when you are having Menu layout using pushbuttons. For each pushbutton, menu index value x can be increased/decreased by any value inc/dec and can be set to a limit max/min

#define INC(x,max,inc) x = (x<=(max - inc))?(x+inc):max
#define DEC(x,min,dec) x = (x>=(min + dec))?(x-dec):min


2. When using RTOS you have periodic tasks that may loop in every 10ms or 50ms etc. Usually while development, we want to constantly change this loop time and test functions out. But while changing this many variables that are dependent on the task time need to be varied. Following macros can be used appropriately adjust the values depending on task time.

#define TASK2_REPEAT_MS        20
#define COUNT_1SEC_TASK2    (1000/TASK2_REPEAT_MS)


example usage

Lets say you have task that repeats every 20ms. and there is a variable that checks for 1sec loop.

 

your caode can be written using above macros:

task2(){

 uint8_t var_u81secCounter;

 var_u81secCounter++;

if(var_u81secCounter > COUNT_1SEC_TASK2    ) {

/* do things whatever you want to do every 1second

}



THis way if you change task periodicity to 50ms, all you need to update is macro TASK2_REPEAT_MS       50. Nothing else






Thursday, August 4, 2022

ESP32 Development

1. In the field of IoT ESP32 is major player. There are many Arduino versions are available, however they are only limited to small projects and hobby projects. If you want to develop a professional application, then you need to learn about ESP-IDF. This is the framework specially developed for ESP32 using which we can quickly drive various peripherals.

2. In addition ESP Also provides eclipse based IDE to make things even easier for developers:

3. Find the ESP-IDE here : https://dl.espressif.com/dl/esp-idf/


 

4. Select 2nd option as offline installer gives you reference that you have v2.5.0 version of IDE & ESP-IDF Version v4.4.

 5.  Git link - https://github.com/espressif/idf-installer

6

 

Thursday, July 21, 2022

Mice Puzzle

 I saw this on a forum. Solution is amazing:


Here is the problem:

Problem. You have mice, and bottles, exactly one of which is poisoned. Each mouse can taste any combination of bottles at once, and if it is poisoned it will die after exactly one minute. Once a mouse is dead, it can't taste any more bottles. How many minutes do you need to determine exactly which bottle is poisoned?