Download Print this page

sparkfun DA16200 Hook-Up Manual page 20

Micromod wifi function board

Advertisement

/******************************************************************************
Example_02 WiFi Communcation
Connect WiFi using the provided network credentials
Talk to NTP server to set the current date/time
Update the time to the correct time zone
Print the current time approx. once every second
Development environment specifics:
IDE: Arduino 1.8.13
Hardware Platform: MicroMod Artemis Processor, Single MicroMod Main Board
Hardware Connections:
Connect the MicroMod Processor Board to the Processor M2 Connector of the Main Board
Connect the MicroMod DA16200 Function Board to the Function M2 Connector of the Main Board
G0
--> RTC_PWR_KEY
4
--> PWR_EN
3.3V
--> 3.3V
GND
--> GND
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.
******************************************************************************/
#define PWR_EN 4
#define RTC_PWR_KEY 16
#define SOFTWARE_SERIAL_BAUD 115200
//#define SOFTWARE_SERIAL_BAUD 9600
String wifiSSID = "SSID";
String wifiPass = "PASSWORD";
int timezoneOffset = 0; //The hours offset from UTC (Mountain time is -6 for daylight savings, a
nd -7 for standard)
void setup() {
Serial.begin(9600);
Serial1.begin(SOFTWARE_SERIAL_BAUD); //Set SoftwareSerial baud
//Enable DA16200 Module RTC power block
pinMode(RTC_PWR_KEY,OUTPUT);
digitalWrite(RTC_PWR_KEY,HIGH);
Serial.println("DA16200 AT Command Example: Connecting to WiFi\n");
//Listen for ready message ("+INIT:DONE")
byte count = 0;
If not, see <http://www.gnu.org/licenses/>.

Advertisement

loading
Need help?

Need help?

Do you have a question about the DA16200 and is the answer not in the manual?

Questions and answers