發表文章

Beaglebone industrial

圖片
there are 2 versions of beaglebone industrial on the market these days(2018/4). 1. red version: element 14 2. Arrow one. it is industrial temp version of beaglebone black. but seems the page disappeared on 4/16/2018 3. beaglecore http://beaglecore.com/ shop  https://www.conrad.com/ce/en/product/1551255/BEAGLECORE-CPU-module-BCM1ETR?ref=searchDetail they do module with industrial temp, and promise support upto 2023. seems Germany made. and still open source.  https://github.com/BeagleCore/Hardware also comes with tape and reel. The best thing of beaglebone is that it has tones of uart for industrial usage. uart0 to uart 5. uart 0 is predefined as debugger port. uart 3 has pin conflict with HDMI(not a problem if u don't use HDMI), so the first used ones are: uart 1,2,4,5 as the latest debain for beaglebone, the hardware configuration is upto user. So, to enable these uarts: refer to  https://billwaa.wordpress.com/2014/10/13/beaglebone-black-enable-all-uart-po...

How many LMIC for arduino are on the net??

I have been trying to work out the TTN in my region which is 923 AS2. spending some time to find out how to make a 1ch gateway, which take only 1ch and 1SF. Now it comes to the node side, most of examples use IBM LMIC and it's variation. IBM LMIC is based on ST MCU, so some porting to arduino IDE. They all have simillar name but with different modification.  and the function to call in arduino are the same, so be very careful to install.(I believe you better have only one on it.) 1. Matthijs Skooij https://github.com/matthijskooijman/arduino-lmic based on LMIC 1.5 providing raw example; used to send lora mac to other, for testing purpose. ttn-abp ttb-otaa No wiki page, but good explaination on readme.md 2. Thomas Telkamp https://github.com/tftelkamp He has 2 git on LMIC, 1. arduino-lmic-v1.5 noted deprecated, and refer reader to Matthijs one.US915/AU915 hybrid mode 2. LoRa-LMIC-1.51 folked from  Forked from  things4u/LoRa-LMIC-1.51  not sure what ...

TTN single channel gateway with esp8266 for us frequency plan at 903.9Mhz

My region is fit for TTN 923 frequency plan, before making a 923 1ch gateway, it's good exercise to 1st make a 915 gateway. Hardware: RFM95, ESP8266 I did not find the hardware guide for V5, but there is one for V4 http://things4u.github.io/HardwareGuide/Single-Channel-Gway/ESP-gateway-v4.html short notice on hardware: The version is done with 2 kinds PCB(3 in V5, additional heltec board) which related to pin connection.There are' Comresult connections: For the bare board solutions the connections that need to be made are as follows: RFM95 pin ESP8266 pin 3.3V VCC 3.3V GND GND MISO D6 GPIO12/MISO MOSI D7 GPIO13/MOSI SCK D5 GPIO14/CLK (*) NSS D8 GPIO15/CS RESET *nc DIO0 D1, GPIO5 DIO1 D2, GPIO4 DIO2 D3, GPIO0 (**) * The reset pin does not have to be connected so it seems. It is only used at setup to read the chip identification ** This connection is not necessary for the current version of the gateway, but is more versatile for next versions or other use ...

Why we should not use the String object of arduino??

When using sd lib, I ran into problem of con char* and string problem in sd.println(), the compiler told me it's not right to write a string.... I have a function which assemble some strings and return back a string. let say String form-string(void); then I tried     myFile = SD.open("test.txt", FILE_WRITE);   // if the file opened okay, write to it:   if (myFile) {     Serial.print("Writing to test.txt...");    myFile.println(form_string());     // close the file:    myFile.close(); The error is that it says it need "const char *" not a "string"... I was so so confused.... I need to go deeper in the string and char array....google it.... turns out that lot of people talk about not to using arduino String objects, saying it's bad, and wast more time and space....well, today we can have powerful and big MCU then before with same cost, I don't really think this is a problem...Until I read this article.... The is...

2018/2/22..Webserver, EEPROM,SD on ESP..

Passing few days in Kaushong lib, I managed to get some very slow progress in my porgramming; 1. Webserver I have first took a example on esp32 with BME280, work note: http://ldsrc.blogspot.tw/2018/02/esp32-web-server-http-learning-with.html and fall into trouble with bme280 lib for esp32, since the adafruit lib is for it's own board, so there is no way to assigned IIC pins. With my heltec wemos esp32 boards, I do need this function to assigned the IIC pins to cowork with other device. After alomost one day of work, I found out that the example use an modified lib of adafruit for BME280, which is able to assign pins. As to web server, I have to attack the knowage of HTML from zero, there are several stuff on html, after some basic knowage, I took the lib from bbx10 to modify it, so that I can show data, base on some parameter to change the html page,get input (i.e. device_ID), and possible to save it to EEPROM. The web server lib is working on both 8266 and 32. the wifi lib...

ESP32 and EEPROM()

There is a library of EEPROM in arduino esp32, and the usage seems very easy and similar to arduino one. and the size of eeprom can be defined at begin: EEPROM.begin(EEPROM_SIZE) and can be written with following, i is address, the 2nd one is the contain, which has a type of Byte EEPROM.write(i,0x00) EEPROM.commit(); for reading: EEPROM.read(i) pretty easy....But you need to have  EEPROM.commit(); at the end otherwise nothing is saving into flash now need to carefully calculate the data I need to write in. device Nr = byte softAP SSID and PSWD, let say 10 char each Need to figure out how to arrange char string and byte array... I need to get string of SSID and PSWD to byte[] array. and will need to get byte[] array back to string

Writing csv formant to SD card on esp8266

It seems that the lib for SD card for 8266 and 32 are not competable....not even SPI lib... and 8266 lib can't assign frequency like in esp32...then it could trouble some to get the spi lib to work with other spi device...may not...if we can setup frequency every time before we write. this could be wrong info from google, there is  boolean SDClass::begin ( uint8_t csPin, uint32_t speed) with the demo of D1 mini of cd card: https://github.com/wemos/D1_mini_Examples/blob/master/examples/04.Shields/Micro_SD_Shield/Datalogger/Datalogger.ino  and others... the pin connection is as following: * The WeMos Micro SD Shield uses: * D5, D6, D7, D8, 3V3 and G * * The shield uses SPI bus pins: * D5 = CLK * D6 = MISO * D7 = MOSI * D8 = CS * * The SD card library uses 8.3 format filenames and is case-insensitive. I first test with cardinfo, and then read and write to make sure that wiring is correct. I wish to make few functions in the web server, such as:...