Jump to content

xeebot

Members
  • Content count

    34
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeebot

  1. Good evening! I'm using a CC3200MOD Launchpad - I have tested this on two of those boards, as well as on a CC3200 Launchpad. The results are the same each time. I have a Reed switch on a bread board. If I connect to Pin 3 (header row one, 3rd pin down from the top), the reed switch value never changes. (results not expected) If I change the jumper wire to Pin 8 and change the sketch from 3 to 8, the Reed value changes state with the presence or removal of a magnet. (expected result) Can anybody point out my error? From the pin map below, the two pins should function the same. Pin Map
  2. @energia Sorry for the delay following up on this - had some family medical issues that I had to be present for. If it is okay, I'm posting my version here in case somebody else needs to do the same thing, will save them a few steps I basically combined the sketch you linked to with the WPA example - this allowed me to get details about the board (mac, IP) and do basic troubleshooting. Switched the Ethernet client to WiFi and plugged in my own values for SMTP and email addresses. I put a comment in indicating which lines somebody who wants to use this would need to change. My next step is to combine this with the "test" firmware I wrote for my PCB, and, if everything works on the Launchpad, upload the bin using Uniflash. Will let you know how that works out! Code from attached Sketch: //combines the WPA WiFi example with the Arduino "panic email" sketch - uses WiFi client in place of Ethernet - WPA client shows data about your board and connection in serial monitor // //replace the variables on lines 8, 10, 12, 15, 17, 18, 67, 71, 75, 82, and 84 (for your board and your SMTP server) // //If all variables are correct, board connects to router then waits until SW3 is pressed, then sends email. // #include <SPI.h> #include <WiFi.h> WiFiClient client; //the Pin for SW3 on a launchpad int buttonPinSW3 = 3; //your router's SSID char ssid[] = "YourSSID"; //your router's password char password[] = "YourPassword"; boolean statusCheck=false; //your board's mac address byte mac[] = { 0xDA, 0xE5, 0x13, 0x25, 0x47, 0xB8 }; //your SMTP server char server[] = "mail.send.com"; int SMTPport = 25; void setup() { Serial.begin(115200); Serial.print("Attempting to connect to Network named: "); Serial.println(ssid); WiFi.begin(ssid, password); while ( WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to Network named: "); Serial.println(ssid); Serial.println("."); delay(300); } Serial.println("\nYou're connected to the network"); Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { Serial.print("."); delay(300); } Serial.println("\nIP Address obtained"); printCurrentNet(); printWifiData(); pinMode(buttonPinSW3, INPUT); } void loop() { if(digitalRead(buttonPinSW3)==HIGH && statusCheck==false) { if(sendEmail()) Serial.println(F("Email sent")); else Serial.println(F("Email failed")); statusCheck = true; } else if (digitalRead(buttonPinSW3)==LOW) { statusCheck = false; } } byte sendEmail() { byte thisByte = 0; byte respCode; if(client.connect(server,SMTPport)) { Serial.println(F("connected")); } else { Serial.println(F("connection failed")); return 0; } if(!eRcv()) return 0; // change to your public ip client.println(F("helo [173.6.157.102]")); if(!eRcv()) return 0; Serial.println(F("Sending From")); // change to your email address (sender) client.println(F("MAIL From: <sender@send.com>")); if(!eRcv()) return 0; // change to recipient address Serial.println(F("Sending To")); client.println(F("RCPT To: <reader@readme.com>")); if(!eRcv()) return 0; Serial.println(F("Sending DATA")); client.println(F("DATA")); if(!eRcv()) return 0; Serial.println(F("Sending email")); // change to recipient address client.println(F("To: You <reader@readme.com>")); // change to your address client.println(F("From: Me <sender@send.com>")); client.println(F("Subject: Panic Alarm!\r\n")); client.println(F("The panic button was pressed!!!")); client.println(F(".")); if(!eRcv()) return 0; Serial.println(F("Sending QUIT")); client.println(F("QUIT")); if(!eRcv()) return 0; client.stop(); Serial.println(F("disconnected")); return 1; } byte eRcv() { byte respCode; byte thisByte; int loopCount = 0; while(!client.available()) { delay(1); loopCount++; // if nothing received for 10 seconds, timeout if(loopCount > 10000) { client.stop(); Serial.println(F("\r\nTimeout")); return 0; } } respCode = client.peek(); while(client.available()) { thisByte = client.read(); Serial.write(thisByte); } if(respCode >= '4') { efail(); return 0; } return 1; } void efail() { byte thisByte = 0; int loopCount = 0; client.println(F("QUIT")); while(!client.available()) { delay(1); loopCount++; // if nothing received for 10 seconds, timeout if(loopCount > 10000) { client.stop(); Serial.println(F("\r\nTimeout")); return; } } while(client.available()) { thisByte = client.read(); Serial.write(thisByte); } client.stop(); Serial.println(F("disconnected")); } void printWifiData() { // print your WiFi IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); Serial.println(ip); byte mac[6]; WiFi.macAddress(mac); Serial.print("MAC address: "); Serial.print(mac[5], HEX); Serial.print(":"); Serial.print(mac[4], HEX); Serial.print(":"); Serial.print(mac[3], HEX); Serial.print(":"); Serial.print(mac[2], HEX); Serial.print(":"); Serial.print(mac[1], HEX); Serial.print(":"); Serial.println(mac[0], HEX); } void printCurrentNet() { Serial.print("SSID: "); Serial.println(WiFi.SSID()); byte bssid[6]; WiFi.BSSID(bssid); Serial.print("BSSID: "); Serial.print(bssid[5], HEX); Serial.print(":"); Serial.print(bssid[4], HEX); Serial.print(":"); Serial.print(bssid[3], HEX); Serial.print(":"); Serial.print(bssid[2], HEX); Serial.print(":"); Serial.print(bssid[1], HEX); Serial.print(":"); Serial.println(bssid[0], HEX); long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.println(rssi); byte encryption = WiFi.encryptionType(); Serial.print("Encryption Type:"); Serial.println(encryption, HEX); Serial.println(); } WiFi_Email_Example.ino
  3. Back in June, I wrote a very basic sketch that sent an email via my hosted SMTP server. Unfortunately, the USB drive I stored the sketch on is toast. I don't recall the source and after digging through the examples, libraries and the forum, I'm unable to find an example I might have drawn from. Does anyone have an idea of what code example I might have used? I know I didn't write anything from scratch. I also know I didn't use Temboo or SMTP2Go, as I still have the email in my gmail mailbox (and it came from my hosted domain).
  4. I don't think that is it, BUT it looks great. I should be able to just switch Ethernet for WiFi and go to town. Thank you, sir!!!!
  5. [SOLVED] Launchpad Pin 3 vs Pin 8

    100% on target, sir! I had actually switched over to a hall sensor on pin 8 with a 10k resistor and just switched to 3. Works like a champ.
  6. [SOLVED] Launchpad Pin 3 vs Pin 8

    Sure enough, pressing PUSH1 and it reads properly. The reed switch is connected to pin 3 via a jumper wire to the breadboard: const int Hall = 3; pinMode(Hall, INPUT_PULLUP); int HallValue = digitalRead(Hall); Serial.print("Hall Sensor Value: "); Serial.println(HallValue); I've got the Piezo working (PWM), so I'm swapping out the reed switch for a Hall sensor. Once I've got that working as expected, I'll compile and should have firmware that can test all the components on my board. Will post something in this forum documenting all the separate little pieces once I have that working. Thank you VERY much for taking the time to answer all of the questions we noobs keep throwing out here. It makes a big difference!
  7. [SOLVED] Launchpad Pin 3 vs Pin 8

    Please note, Pin 3 is RX on the Launchpad, so I am wondering if the pin is reserved for that reason or if there is something else going on - hopefully, it isn't reserved, as RX is not needed when the BIN is already uploaded and running
  8. You rock! I've managed to come down with bronchitis, so I haven't been at my desk for a couple of days. As soon as I'm over this and am hammering on this again, I'll let you know how it works out.
  9. Hello, everyone! Don't know if @Rei Vilo or @energia would like to make a suggestion, but I hope so! I'm working on a project using the CC3200Mod. The PCB should be ready later this week and I'd like to give the designer a basic firmware file to test it. This was no problem on the launchpad, but after we went over the schematic, we found that the pin layout is very different between the CC3200 and the CC3200Mod. Working with launchpads doesn't make a difference, but the PCB doesn't have those ports available, everything is connected to the pin on the chip. Will I be better off by modifying my pin_energia.h file to represent the CC32000MOD's layout or should I map the individual GPIOs in my sketch? Current pin_energia.h (matches CC32000 pin out): const uint16_t digital_pin_to_pin_num[] = { NOT_A_PIN, /* dummy */ NOT_A_PIN, /* 1 - 3.3V */ PIN_58, /* 2 - GPIO_03 */ PIN_04, /* 3 - GPIO_13 */ PIN_03, /* 4 - GPIO_12 */ PIN_61, /* 5 - GPIO_06 */ PIN_59, /* 6 - GPIO_04 */ PIN_05, /* 7 - GPIO_14 */ PIN_62, /* 8 - GPIO_07 */ PIN_01, /* 9 - GPIO_10 */ PIN_02, /* 10 - GPIO_11 */ PIN_15, /* 11 - GPIO_22 */ PIN_55, /* 12 - GPIO_01 */ PIN_21, /* 13 - GPIO_25 */ PIN_06, /* 14 - GPIO_15 */ PIN_07, /* 15 - GPIO_16 */ NOT_A_PIN, /* 16 - RESET */ PIN_45, /* 17 - GPIO_31 */ PIN_08, /* 18 - GPIO_17 */ PIN_18, /* 19 - GPIO_28 */ NOT_A_PIN, /* 20 - GND */ NOT_A_PIN, /* 21 - 5V */ NOT_A_PIN, /* 22 - GND */ PIN_57, /* 23 - GPIO_02 */ PIN_60, /* 24 - GPIO_05 */ PIN_58, /* 25 - GPIO_03 */ PIN_59, /* 26 - GPIO_04 */ PIN_63, /* 27 - GPIO_08 */ PIN_53, /* 28 - GPIO_30 */ PIN_64, /* 29 - GPIO_09 */ PIN_50, /* 30 - GPIO_00 */ PIN_17, /* 31 - GPIO_24 */ PIN_16, /* 32 - GPIO_23 */ PIN_60, /* 33 - GPIO_05 */ PIN_62, /* 34 - GPIO_07 */ PIN_18, /* 35 - GPIO_28 */ PIN_21, /* 36 - GPIO_25 */ PIN_64, /* 37 - GPIO_09 */ PIN_17, /* 38 - GPIO_24 */ PIN_01, /* 39 - GPIO_10 */ PIN_02 /* 40 - GPIO_11 */ }; CC3200 pinout: http://www.ti.com/ods/images/SWAS032F/po_DEV3200_swas032.gif CC3200MOD pinout: http://www.ti.com/ods/images/SWRS166/CC3200MOD_Pin_Diagram.gif Any thoughts or opinions would be very welcome!
  10. There is always a VERY good chance I am overthinking things. If you've got time to do it and don't mind, I'll really appreciate it. Also, my board doesn't have a USB connection - I use the Launchpad to flash the board to upload the bin I create in Energia using Uniflash (also can run example programs in debug mode in CCS using JTAG). Does that affect the use of a lightweight package?
  11. No problem. Technically speaking, I'm back at square one, will likely have to go to CCS as I can't get it working with my board, but I'm very grateful for the advice.
  12. I'm not sure I understand - I should just swap the pin numbers in the existing pins_energia.h file in a trial and error approach or I should do something different?
  13. That did it. I removed the 6.3 folder and it compiles.
  14. Good morning! I set up a new install of Windows with CCS and Energia installed. While going through the quick start guide, I found I was unable to compile the Blink example. I assumed that the issue was due to using the drivers from Ti's SDK rather than DPInst64 - I was unable to get a copy of the drivers posted here. After obtaining the drivers and installing, I still get the same error. I have also installed Energia on a second and get the same errors during compile. Error messages are below: <command-line>:0:15: warning: ISO C++11 requires whitespace after the macro name In file included from c:\users\doug\appdata\local\energia15\packages\energia\tools\arm-none-eabi-gcc\6.3.1-20170620\arm-none-eabi\include\string.h:10:0, from C:\Users\Doug\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\cores\cc3200/Energia.h:8, from C:\Users\Doug\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\cores\cc3200/Arduino.h:3, from C:\Users\Doug\AppData\Local\Temp\builda9304c47a9d01225cec361d757013532.tmp\sketch\Blink.ino.cpp:1: c:\users\doug\appdata\local\energia15\packages\energia\tools\arm-none-eabi-gcc\6.3.1-20170620\arm-none-eabi\include\stdlib.h:225:8: error: conflicting declaration of C function 'char* utoa(unsigned int, char*, int)' char * _EXFUN(utoa,(unsigned, char *, int)); ^ In file included from C:\Users\Doug\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\cores\cc3200/Energia.h:10:0, from C:\Users\Doug\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\cores\cc3200/Arduino.h:3, from C:\Users\Doug\AppData\Local\Temp\builda9304c47a9d01225cec361d757013532.tmp\sketch\Blink.ino.cpp:1: C:\Users\Doug\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\cores\cc3200/itoa.h:34:14: note: previous declaration 'char* utoa(long unsigned int, char*, int)' extern char* utoa( unsigned long value, char *string, int radix ) ; ^~~~ exit status 1 Error compiling for board CC3200-LAUNCHXL (80MHz). Any assistance would be appreciated.
  15. Please disregard. I was able to get a copy of the driver file and the error is still there. Will post it in a new thread. Also, if anyone else needs the driver before the admins are able to update the link or restore the missing file, I've attached it here. cc3200_drivers_win.zip
  16. Can anyone send me a copy, please? I have the SDK installed, so the board shows properly in Device Manager, but I get a compile error in Energia. Prior to this, I did a clean install of Energia on a new install of Windows and when I went to grab the CC3200 drivers, they're not available: http://energia.nu/guide/guide_windows/ The link to http://energia.nu/files/cc3200_drivers_win.zip shows: Oops! Our 404 is showing... That page can’t be found. Nothing was found at this web address. Click your back button, use the menu tabs, or try a search?
  17. Also, just in case the driver is not the issue, I've included the error text in the attached text. error.txt
  18. I missed this when I answered the Pm yesterday! There are 10 GPIOs (1 ADC, 1 PWM, 2 UART) GPIO 0 PIN 44 ADC - EN (voltage measurement) GPIO 1 PIN 46 TX (UART) GPIO 2 PIN 47 RX (UART) GPIO 4 PIN 49 VMEAS_BAT (voltage measurement) GPIO 5 PIN 50 ADC - DRV5053 - omnidirectional Hall sensor GPIO 10 PIN 3 PWM - Piezo GPIO 12 PIN 9 LED GPIO 13 PIN 10 DRV5032 bi-directional Hall sensor GPIO 14 PIN 5 LED GPIO 28 PIN 19 LED Is that too many to remap an existing board?
  19. @energia Happy New Year, Robert! I've been on quite a roller coaster getting my board ready, but it is finally finished and I can focus on my firmware. Could you possibly give me some guidance on what I actually need to do to create a light weight package? I can extract and duplicate my own version of each file in each archive if needed, but are there any components that I don't need to reproduce? Is there any other guidance you can share to give me some direction? Thanks Doug
  20. @energia Thank you, Robert! Since this is a variant of the CC3200, I assume I'll add it to: C:\Users\username\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\variants\ That should give me a quick stop-gap for making test firmware for the new PCB. Making a lightweight package is probably the way I'll go, and hosting will not be a problem, I just have to puzzle out what I'm doing I really appreciate the advice!
  21. Good morning (or good evening)! First of all, if these questions are stupid, don't spare my feelings. I know better than anyone that I'm still new at this and I have thick skin. I've had a great deal of success writing my own sketches with Energia. It's fun, simple-to-use, and easy to explain to others, but I have a few questions: 1) is Energia suitable for firmware in a small commercial product or is it intended more as a rapid prototyping framework, with "permanent" firmware written in CC7? 2) When working with a PCB using the CC3200MOD, how would I flash my Energia sketch onto the modules flash? 3) If I were to have a few hundred PCBs produced for a task at my day job, would each PCB (using the CC3200MOD) have to be individually flashed by hand or is there a way to have this done during the assembly process? For a small project like this, I don't feel that having a PCB designer work out a PCB trace antenna would be cost effective - plus my boss would want to avoid FCC issues at all costs - so the MOD version would clearly be better. I just don't know enough (yet) to know if the MOD version can be used in mass production, even on a small scale. Again, as I said, I've had SO much fun with Energia! I would like to thank Robert Wessels for making this experience possible. I feel like I could make every device and every toy that I've ever thought would be cool, by using Energia with the TI CC3200 platform. This is so cool!
  22. More CC3200MOD Questions

    So, in case anybody else is curious, I've got the answer to my own question. Rename your bin to "mcuimg.bin" In Uniflash, go to the System Files, find /sys/mcuimg.bin Click the BROWSE button for URL and navigate to your file. Mark Erase, Update, and Verify. Go back to Flash Setup and Control, click Program. Enjoy. I really have to say that this is fantastic.I'm going to see what functions I can duplicate from CCS this way.
  23. More CC3200MOD Questions

    Gave that a try and was unable to find the BIN file - it didn't give me a folder location ("/sys/mcuimg.bin" - don't have a sys folder, so assume it's on the launchpad as I often see it in Uniflash logs) On the other hand, I stumbled across a menu option: Go to the Sketch menu. Select Export Completed Binary Check the Sketch's folder, grab your bin upload to Uniflash Is there any other step involved? I gave it a try but the sketch just locks up my launchpad and I have to disconnect/reconnect, format, program, flash SP, then flash it to something else - even flashing the same sketch I'd exported works.
  24. More CC3200MOD Questions

    I just had a Keanu moment after that - realizing that Energia, not CCS7 - whoa! You weren't kidding last week.
×