Navigation

    MakerGram Logo

    MakerGram

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. Popular
    Log in to post
    • All categories
    • Announcements
    • General Discussion
    • Jobs & Opportunities
    • Development Boards
    •      Raspberry Pi
    •      Arduino
    •      ESP32
    • Digital Fabrication
    •      3D Printing
    •      Laser Cutting
    •      CNC Machining
    •          PCB Designing
    •          MakerSpaces
    •              Fablab Kerala
    •              Steag Center For Smart City Technologies
    •                  RSET PCB Designing Workshop
    •                  Hack Chat
    • Events & Hackathons
    •      HackClub: HackCamp 2020
    •      MakerChat
    • Showcase
    •      Fight Against COVID19 Outbreak
    • News
    • MakerCuriosity
    • Comments & Feedback
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month
    • kowshik1729

      PCB Design for ESP32 Stand alone module
      PCB Designing • esp32 pcb • • kowshik1729

      30
      1
      Votes
      30
      Posts
      6189
      Views

      S

      no. we are using jumper for gpio 0th pin. please refer the below image.
      freesnippingtool.com_capture_20200721200934.png
    • Z

      Schematic Design For esp32
      PCB Designing • • ZeeZa

      20
      0
      Votes
      20
      Posts
      2081
      Views

      Z

      That's alright @kowshik1729 i will check other forum and also await your answer. also i am trying to calculate the pcb track width and via diameter for the board, i am asking since we printing similar boards.
      Thanks....

    • S

      [Solved] leaf disease detection using keras
      General Discussion • • sreu13

      18
      0
      Votes
      18
      Posts
      585
      Views

      S

      @salmanfaris i know there was a delay in replies, i thought of finishing the project and replying here!....
      i ddnt get the exact reason, but the problem was solved

      what i did was , label binarized was working fine when i did created the training model. So i loaded my training model and deleted the script for the training procedure. i ended up with the code given below. and it worked up fine.

      import numpy as np import pickle import cv2 from os import listdir from sklearn.preprocessing import LabelBinarizer from keras.models import Sequential from keras.layers.normalization import BatchNormalization from keras.layers.convolutional import Conv2D from keras.layers.convolutional import MaxPooling2D from keras.layers.core import Activation, Flatten, Dropout, Dense from keras import backend as K from keras.preprocessing.image import ImageDataGenerator from keras.optimizers import Adam from keras.preprocessing import image from keras.preprocessing.image import img_to_array from sklearn.preprocessing import MultiLabelBinarizer from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt EPOCHS = 25 INIT_LR = 1e-3 BS = 32 default_image_size = tuple((256, 256)) image_size = 0 directory_root = 'PlantVillage' width=256 height=256 depth=3 #Function to convert images to array def convert_image_to_array(image_dir): try: image = cv2.imread(image_dir) if image is not None : image = cv2.resize(image, default_image_size) return img_to_array(image) else : return np.array([]) except Exception as e: print(f"Error : {e}") return None listdir(directory_root) image_list, label_list = [], [] try: print("[INFO] Loading images ...") root_dir = listdir(directory_root) for directory in root_dir : # remove .DS_Store from list if directory == ".DS_Store" : root_dir.remove(directory) for plant_folder in root_dir : plant_disease_folder_list = listdir(f"{directory_root}/{plant_folder}") for disease_folder in plant_disease_folder_list : # remove .DS_Store from list if disease_folder == ".DS_Store" : plant_disease_folder_list.remove(disease_folder) for plant_disease_folder in plant_disease_folder_list: print(f"[INFO] Processing {plant_disease_folder} ...") plant_disease_image_list = listdir(f"{directory_root}/{plant_folder}/{plant_disease_folder}") for single_plant_disease_image in plant_disease_image_list : if single_plant_disease_image == ".DS_Store" : plant_disease_image_list.remove(single_plant_disease_image) for image in plant_disease_image_list[:200]: image_directory = f"{directory_root}/{plant_folder}/{plant_disease_folder}/{image}" if image_directory.endswith(".jpg") == True or image_directory.endswith(".JPG") == True: image_list.append(convert_image_to_array(image_directory)) label_list.append(plant_disease_folder) print("[INFO] Image loading completed") except Exception as e: print(f"Error : {e}") image_size = len(image_list) #Transform Image Labels uisng Scikit Learn's LabelBinarizer label_binarizer = LabelBinarizer() image_labels = label_binarizer.fit_transform(label_list) pickle.dump(label_binarizer,open('label_transform.pkl', 'wb')) n_classes = len(label_binarizer.classes_) #Print the classes print(label_binarizer.classes_) #load saved pickle model loaded_model = pickle.load(open('cnn_model.pkl', 'rb')) model_disease=loaded_model #load plant leaf image image_dir="plantdisease/Validation_Set/Potato___Early_blight/1d301622-e359-49d5-b4ca-6837f254fd1b___RS_Early.B 6719.JPG" #convert leaf image to arrays im=convert_image_to_array(image_dir) np_image_li = np.array(im, dtype=np.float16) / 225.0 npp_image = np.expand_dims(np_image_li, axis=0) result=model_disease.predict(npp_image) print(result) #printing result itemindex = np.where(result==np.max(result)) print("probability:"+str(np.max(result))+"\n"+label_binarizer.classes_[itemindex[1][0]])
    • kowshik1729

      Custom board for running ML models
      PCB Designing • • kowshik1729

      17
      1
      Votes
      17
      Posts
      613
      Views

      salmanfaris

      @kowshik1729 I think that might not get since the platform is not opensource! but they provided everything you need to develop a system with that.

    • rafitc99

      SIM800L is not working after disconnecting with PC
      Arduino • • rafitc99

      17
      0
      Votes
      17
      Posts
      156
      Views

      rafitc99

      Thank-you @salmanfaris
      It's solved.
      Actually, It was my mistake. I didn't add a proper reset for MCU.

    • kowshik1729

      Automatic pairing of ESP32 using BLE
      Arduino • ble bluetooth esp32 masterslaveco • • kowshik1729

      17
      0
      Votes
      17
      Posts
      6163
      Views

      kowshik1729

      @salmanfaris I have finally figured out a way to send any data that comes over the serial of the Server ESP32 to client ESP32 over BLE. I understood that the whole BLE code that we are dealing with, works very fine in accepting the "C Strings". So, I wrote the below function in order to accept the values coming from the Serial monitor of the server(I connected the ESP's to my computer via serial port and that's how I am able to write the values to them using serial monitor). Check out my corrected code👇

      if(Serial.available()>0) { String sending = Serial.readString(); //Reading from the Serial monitor std::string s = sending.c_str(); //Converting the read string to so called "C String" pCharacteristic->setValue(s); pCharacteristic->notify(); }

      It worked very fine in receiving the data over the Client side. But, there is a discrepancy here. A speck of data that is sent in 1st iteration is being repeated in the second one and the data from second and first iterations are being visible in the third iteration and so on.

      fe6f6353-b313-49ed-a080-d106f3c40d6f-image.png

      I suspect that there is something wrong with the storage buffer(Bluetooth stack). I think that the buffer is not being cleared/flushed properly each time the incoming data is coming. Is there any way to flush the data each time the server notifies the client with a data? Please suggest me ways to do it.

      The code for accepting data from the mobile phone is

      // Server side code /* A connect hander associated with the server starts a background task that performs notification every couple of seconds. */ #include <BLEDevice.h> #include <BLEServer.h> #include <BLEUtils.h> #include <BLE2902.h> #include <BLECharacteristic.h> #ifdef __cplusplus extern "C" { #endif uint8_t temprature_sens_read(); #ifdef __cplusplus } #endif uint8_t temprature_sens_read(); BLEServer* pServer = NULL; BLECharacteristic* pCharacteristic = NULL; bool deviceConnected = false; bool oldDeviceConnected = false; float mea = 0; int LED13 = 5; // The on-board Arduion LED // https://www.uuidgenerator.net/ #define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b" #define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8" class MyServerCallbacks: public BLEServerCallbacks { void onConnect(BLEServer* pServer) { deviceConnected = true; BLEDevice::startAdvertising(); }; void onDisconnect(BLEServer* pServer) { deviceConnected = false; } }; void setup() { Serial.begin(115200); // Create the BLE Device BLEDevice::init("Serv"); // Create the BLE Server pServer = BLEDevice::createServer(); pServer->setCallbacks(new MyServerCallbacks()); // Create the BLE Service BLEService *pService = pServer->createService(SERVICE_UUID); // Create a BLE Characteristic pCharacteristic = pService->createCharacteristic( CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE | BLECharacteristic::PROPERTY_NOTIFY ); // https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml // Create a BLE Descriptor pCharacteristic->addDescriptor(new BLE2902()); // Start the service pService->start(); // Start advertising BLEAdvertising *pAdvertising = BLEDevice::getAdvertising(); pAdvertising->addServiceUUID(SERVICE_UUID); pAdvertising->setScanResponse(false); pAdvertising->setMinPreferred(0x0); // set value to 0x00 to not advertise this parameter BLEDevice::startAdvertising(); pinMode(LED13, OUTPUT); Serial.println("Waiting a client connection to notify..."); } void loop() { // notify changed value // Read the PulseSensor's value. // Assign this value to the "Signal" variable if (deviceConnected) { if(Serial.available()>0) { String sending = Serial.readString(); std::string s =sending.c_str(); pCharacteristic->setValue(s); pCharacteristic->notify(); } // Bluetooth stack will go into congestion, if too many packets are sent, in 6 hours test i was able to go as low as 3ms } else { digitalWrite(LED13, LOW); // Else, the sigal must be below "550", so "turn-off" this LED. } delay(10); }
    • Nandu

      [Solved] Help needed for face detection -deep learning
      General Discussion • • Nandu

      16
      0
      Votes
      16
      Posts
      189
      Views

      A

      @Mennyt Hai Mennyt. There is a couple of ways:

      Using Cascade Trainer GUI- Tutorial Programmatic way
    • S

      Error on Raspberry PI 4 while opening TensorFlow.
      General Discussion • • sreu13

      15
      0
      Votes
      15
      Posts
      1055
      Views

      A

      @sreu13 You have to deploy a flask server on your Google cloud instance. Also create local flask server on your RasPi. Upload your image on RasPi flask server. Convert image to base64 format. Send naseer image to flask server deployed on Google cloud instance. Then convert back base64 normal image file. Then process image on your flask server. It might solve your problem.

    • S

      Help needed: Arduino Wireless Notice Board project
      Arduino • • SAFVAN

      15
      0
      Votes
      15
      Posts
      326
      Views

      rafitc99

      @salmanfaris tried @arunksoman suggestion , c_str() instead to_charArray().. But want to parse SMS body only. Now working on that.

    • rafitc99

      GPS + RF433 Not working together.
      Arduino • • rafitc99

      14
      1
      Votes
      14
      Posts
      135
      Views

      manthan555

      @rafitc99
      Remember one thing...
      For all you guys who work with software serial or hardware serial...

      First and most important thing is while working with software serial... In loop remember that softwareSerial never generate interrupt while it receives any data as you can say triggers if condition... When it's turn comes it checks otherwise if condition will bypass so your target or trigger cannot be achieved....

      For hardware serial always prefer to use interrupt method to get data for each character you can receive simultaneously loops runs any function or not... It's surely you can get all the data from serial... Although mcu runs any kinds of task it leaves and goes on serial interrupt...

      So it's my experience and suggestions to all you guys to remeber this thing...

      If you all.come across the situations that there is no provision to use hardware serial and you need to use softwareSerial then remember that your loop must have intelligence to get the data from softwareserial by if condition which does not effect other functions in loop.. kindly for RF functions which must be used in loop that can't be avoided by any delay functionality... So Millis can be helpful or timer interrupt can help you...

      Thanks...